Skip to content

Commit ef3b388

Browse files
committed
make controller-level pre-suspend wait duration configurable
1 parent eae8de6 commit ef3b388

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cli-v3/src/entryPoints/managed-run-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const Env = z.object({
5555
TRIGGER_MACHINE_MEMORY: z.string().default("0"),
5656
TRIGGER_RUNNER_ID: z.string(),
5757
TRIGGER_METADATA_URL: z.string().optional(),
58+
TRIGGER_PRE_SUSPEND_WAIT_MS: z.coerce.number().default(200),
5859

5960
// Timeline metrics
6061
TRIGGER_POD_SCHEDULED_AT_MS: DateEnv,
@@ -610,8 +611,7 @@ class ManagedRunController {
610611
return;
611612
}
612613

613-
// TODO: Make this configurable and add wait debounce
614-
await sleep(200);
614+
await sleep(env.TRIGGER_PRE_SUSPEND_WAIT_MS);
615615

616616
if (snapshot.friendlyId !== this.snapshotFriendlyId) {
617617
this.sendDebugLog({

0 commit comments

Comments
 (0)