Set the timeout for canceling checkpoints

This commit is contained in:
Matt Aitken
2024-05-13 16:50:53 +01:00
parent 2081cb15b8
commit 1477a2e309
2 changed files with 13 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---
Increased the timeout when canceling a checkpoint to 31s (to match the timeout on the server)
@@ -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