Skip to content

Commit 13e385d

Browse files
committed
fix(core): retry run start-attempt on transient connection errors
1 parent c72ebf9 commit 13e385d

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

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+
Retry the run start request on transient connection errors. Previously a brief connection blip when starting a run could send it back through the queue and delay its first attempt; it is now retried in place.

packages/core/src/v3/runEngineWorker/workload/http.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ export class WorkloadHttpClient {
165165
...this.defaultHeaders(),
166166
},
167167
body: JSON.stringify(body),
168+
},
169+
{
170+
retry: {
171+
minTimeoutInMs: 1000,
172+
maxTimeoutInMs: 10_000,
173+
maxAttempts: 6,
174+
factor: 2,
175+
randomize: true,
176+
},
168177
}
169178
);
170179
}

0 commit comments

Comments
 (0)