Skip to content

Commit

Permalink
Set the timeout for canceling checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-aitken committed May 13, 2024
1 parent 2081cb1 commit 1477a2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-files-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---

Increased the timeout when canceling a checkpoint to 31s (to match the timeout on the server)
12 changes: 8 additions & 4 deletions packages/core/src/v3/runtime/prodRuntimeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ export class ProdRuntimeManager implements RuntimeManager {
clock.reset();

// The coordinator should cancel any in-progress checkpoints
const { checkpointCanceled, version } = await this.ipc.sendWithAck("CANCEL_CHECKPOINT", {
version: "v2",
reason: "WAIT_FOR_DURATION",
});
const { checkpointCanceled, version } = await this.ipc.sendWithAck(
"CANCEL_CHECKPOINT",
{
version: "v2",
reason: "WAIT_FOR_DURATION",
},
31_000
);

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

0 comments on commit 1477a2e

Please sign in to comment.