@@ -47,6 +47,7 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
4747 cmd,
4848 } ) ) ;
4949
50+ const inProgressCommands = [ ] ;
5051 logStartCycle ( maxThreads , attemptsCount , inTimeCommands ) ;
5152
5253 async function runCommand ( commands ) {
@@ -60,11 +61,15 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
6061
6162 const executionIndex = commadData . attemptsCount -- ;
6263 if ( isString ( commadData . cmd ) ) {
64+ const index = inProgressCommands . push ( commadData . cmd ) - 1 ;
6365 result = await executeCommandAsync ( commadData . cmd , attemptsCount - executionIndex ) . catch ( error =>
6466 logger . error ( error ) ,
6567 ) ;
68+ inProgressCommands . splice ( index , 1 ) ;
6669 } else if ( isFunction ( commadData . cmd ) || isAsyncFunction ( commadData . cmd ) ) {
70+ const index = inProgressCommands . push ( commadData . cmd . toString ( ) ) - 1 ;
6771 result = await commadData . cmd ( attemptsCount - executionIndex ) . catch ( error => logger . error ( error ) ) ;
72+ inProgressCommands . splice ( index , 1 ) ;
6873 }
6974
7075 if ( result ) {
@@ -80,12 +85,15 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
8085 currentSessionCount -= 1 ;
8186 }
8287 }
88+
8389 async function runCommandsArray ( commands : any [ ] ) {
8490 const initialCommandsCount = commands . length ;
8591 const asserter = setInterval ( ( ) => runCommand ( commands ) , pollTime ) ;
8692
8793 const logProcessesProgressLoggerRunner =
88- logProcessesProgress && setInterval ( ( ) => logMiddleResultsCycle ( initialCommandsCount , commands ) , 5000 ) ;
94+ logProcessesProgress &&
95+ setInterval ( ( ) => logMiddleResultsCycle ( initialCommandsCount , commands , inProgressCommands ) , 5000 ) ;
96+
8997 const watcherRunner = watcher && setInterval ( watcher , 5000 ) ;
9098
9199 do {
0 commit comments