Skip to content

Commit 7635586

Browse files
committed
Fix build
1 parent d273a41 commit 7635586

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/sim/executor/handlers/mothership/mothership-handler.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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
})

0 commit comments

Comments
 (0)