Skip to content

Commit 1477a2e

Browse files
committed
Set the timeout for canceling checkpoints
1 parent 2081cb1 commit 1477a2e

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.changeset/lazy-files-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Increased the timeout when canceling a checkpoint to 31s (to match the timeout on the server)

packages/core/src/v3/runtime/prodRuntimeManager.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ export class ProdRuntimeManager implements RuntimeManager {
7575
clock.reset();
7676

7777
// The coordinator should cancel any in-progress checkpoints
78-
const { checkpointCanceled, version } = await this.ipc.sendWithAck("CANCEL_CHECKPOINT", {
79-
version: "v2",
80-
reason: "WAIT_FOR_DURATION",
81-
});
78+
const { checkpointCanceled, version } = await this.ipc.sendWithAck(
79+
"CANCEL_CHECKPOINT",
80+
{
81+
version: "v2",
82+
reason: "WAIT_FOR_DURATION",
83+
},
84+
31_000
85+
);
8286

8387
if (checkpointCanceled) {
8488
// There won't be a checkpoint or external resume and we've already completed our internal timeout

0 commit comments

Comments
 (0)