fix(outbox) : retry temporary worker connection failures
CI / Verify (push) Successful in 1m52s
CI / Build immutable images and deploy (push) Failing after 12m10s

This commit is contained in:
2026-10-09 19:04:12 +07:00 Unverified
parent 32a71be3e9
commit b49b758c99
2 changed files with 115 additions and 1 deletions
+9 -1
View File
@@ -74,7 +74,15 @@ async function run(): Promise<void> {
}
try {
await run();
while (!stopping) {
try {
await run();
} catch (cause) {
console.error("Outbox worker failed; retrying in 5 seconds", cause);
await Promise.all([closeDb(), closeRedisClient()]);
if (!stopping) await wait(5_000);
}
}
} finally {
await Promise.all([closeDb(), closeRedisClient()]);
}