Feat : Auto restart after crash

This commit is contained in:
decolua committed 2026-03-14 09:37:29 +07:00
1 parent 549223c8cf
commit adae2605bf
31 files changed
+340 -189

No files matched your search

+3 -1
View File
@@ -254,7 +254,9 @@ async function onboardUser(accessToken, tierID, externalSignal) {
console.warn(`[ProjectId] onboardUser failed after ${MAX_ATTEMPTS} attempts: ${error.message}`);
return null;
}
throw error;
// Continue to next attempt instead of throwing (which would skip remaining retries)
console.warn(`[ProjectId] onboardUser attempt ${attempt} failed: ${error.message}, retrying...`);
await new Promise(resolve => setTimeout(resolve, 2000));
} finally {
clearTimeout(timeoutId);
externalSignal?.removeEventListener("abort", forwardAbort);