File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
internal-packages/run-engine/src/engine Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,7 @@ export class RunLocker {
9393 this . automaticExtensionThreshold = options . automaticExtensionThreshold ?? 500 ;
9494
9595 this . redlock = new Redlock ( [ options . redis ] , {
96- driftFactor : 0.01 ,
9796 retryCount : 0 , // Disable Redlock's internal retrying - we handle retries ourselves
98- retryDelay : 200 , // Not used since retryCount = 0
99- retryJitter : 200 , // Not used since retryCount = 0
100- automaticExtensionThreshold : this . automaticExtensionThreshold ,
10197 } ) ;
10298 this . asyncLocalStorage = new AsyncLocalStorage < LockContext > ( ) ;
10399 this . logger = options . logger ;
@@ -428,6 +424,11 @@ export class RunLocker {
428424 controller : AbortController ,
429425 scheduleNext : ( ) => void
430426 ) : Promise < void > {
427+ // Check if cleanup has started before proceeding
428+ if ( context . timeout === null ) {
429+ return ;
430+ }
431+
431432 context . timeout = undefined ;
432433
433434 const [ error , newLock ] = await tryCatch ( context . lock . extend ( duration ) ) ;
You can’t perform that action at this time.
0 commit comments