Roll deployment restarts through a shared fleet-wide recovery limit
This commit is contained in:
@@ -18,7 +18,15 @@ let started = false;
|
||||
let tickTimer: NodeJS.Timeout | null = null;
|
||||
let statusTimer: NodeJS.Timeout | null = null;
|
||||
|
||||
async function tick(): Promise<void> {
|
||||
let tickInFlight: Promise<void> | null = null;
|
||||
|
||||
function tick(): Promise<void> {
|
||||
if (tickInFlight) return tickInFlight;
|
||||
tickInFlight = runTick().finally(() => { tickInFlight = null; });
|
||||
return tickInFlight;
|
||||
}
|
||||
|
||||
async function runTick(): Promise<void> {
|
||||
try {
|
||||
await sweep();
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user