File tree Expand file tree Collapse file tree
apps/sim/executor/handlers/mothership Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,16 +71,17 @@ export class MothershipBlockHandler implements BlockHandler {
7171 ctx . abortSignal ?. addEventListener ( 'abort' , onAbort , { once : true } )
7272 }
7373
74- const useRedisCancellation = isRedisCancellationEnabled ( ) && ! ! ctx . executionId
74+ const executionId = ctx . executionId
75+ const useRedisCancellation = isRedisCancellationEnabled ( ) && ! ! executionId
7576 let pollInFlight = false
7677 const cancellationPoller =
77- useRedisCancellation && ctx . executionId
78+ useRedisCancellation && executionId
7879 ? setInterval ( ( ) => {
7980 if ( pollInFlight || abortController . signal . aborted ) {
8081 return
8182 }
8283 pollInFlight = true
83- void isExecutionCancelled ( ctx . executionId )
84+ void isExecutionCancelled ( executionId )
8485 . then ( ( cancelled ) => {
8586 if ( cancelled && ! abortController . signal . aborted ) {
8687 abortController . abort ( 'workflow_execution_cancelled' )
@@ -89,7 +90,7 @@ export class MothershipBlockHandler implements BlockHandler {
8990 . catch ( ( error ) => {
9091 logger . warn ( 'Failed to poll workflow cancellation for Mothership block' , {
9192 blockId : block . id ,
92- executionId : ctx . executionId ,
93+ executionId,
9394 error : error instanceof Error ? error . message : String ( error ) ,
9495 } )
9596 } )
You can’t perform that action at this time.
0 commit comments