Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot] 2026-04-24 10:32:26 +00:00
parent 467f3edfb9
commit b650a0f11d

View file

@ -335,7 +335,7 @@ async function scheduleRetry(
agent: { id: string }, agent: { id: string },
jobId: string, jobId: string,
message: string, message: string,
) { ): Promise<boolean> {
const { data: job } = await supabase const { data: job } = await supabase
.from("provisioning_jobs") .from("provisioning_jobs")
.select("attempt, max_attempts") .select("attempt, max_attempts")
@ -347,7 +347,7 @@ async function scheduleRetry(
if (attempt >= max) { if (attempt >= max) {
await failJob(supabase, agent, jobId, `Max attempts reached. Last error: ${message}`); await failJob(supabase, agent, jobId, `Max attempts reached. Last error: ${message}`);
return; return true;
} }
const nextDelayMs = Math.pow(attempt, 2) * 60_000; const nextDelayMs = Math.pow(attempt, 2) * 60_000;