File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/runner/Synapse.Runner/Services/Executors Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,15 @@ protected override async Task DoExecuteAsync(CancellationToken cancellationToken
6868 {
6969 if ( this . Collection == null ) throw new InvalidOperationException ( "The executor must be initialized before execution" ) ;
7070 var task = await this . Task . GetSubTasksAsync ( cancellationToken ) . OrderBy ( t => t . CreatedAt ) . LastOrDefaultAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
71- var index = task == null ? 0 : int . Parse ( task . Reference . OriginalString . Split ( '/' , StringSplitOptions . RemoveEmptyEntries ) . Last ( ) ) ;
72- if ( index == this . Collection . Count - 1 )
71+ var index = 0 ;
72+ if ( task != null )
7373 {
74- await this . SetResultAsync ( this . Task . Input , this . Task . Definition . Then , cancellationToken ) . ConfigureAwait ( false ) ;
75- return ;
74+ index = int . Parse ( task . Reference . OriginalString . Split ( '/' , StringSplitOptions . RemoveEmptyEntries ) . Last ( ) ) ;
75+ if ( index == this . Collection . Count - 1 )
76+ {
77+ await this . SetResultAsync ( this . Task . Input , this . Task . Definition . Then , cancellationToken ) . ConfigureAwait ( false ) ;
78+ return ;
79+ }
7680 }
7781 var item = this . Collection . ElementAt ( index ) ;
7882 var taskDefinition = new DoTaskDefinition ( )
You can’t perform that action at this time.
0 commit comments