Fix lifecycle review findings

Advance each serialized web-provider queue when an aborted caller is released while retaining terminal observation of the underlying request. Preserve an accepted pending start across repeated stop requests and dispatch it exactly once after drain. Derive provider retry deadlines from eligible queued items, configured fallback chains, enabled accounts and keys, and matching provider or hoster cooldowns. Add RED-to-GREEN coverage for queue progress, repeated stop behavior, disabled accounts, alternative providers, unrelated hosters, and post-processing-only state.
This commit is contained in:
Sucukdeluxe
2026-08-22 10:53:00 +02:00
parent ad29239661
commit ab31d04410
10 changed files with 326 additions and 38 deletions
+4 -3
View File
@@ -315,10 +315,11 @@ export class AllDebridWebFallback {
throw new Error(`AllDebrid-Web Queue-Timeout (${Math.floor(waited / 1000)}s gewartet)`);
}
return job();
};
};
const run = this.queue.then(guardedJob, guardedJob);
this.queue = run.then(() => undefined, () => undefined);
return raceWithAbort(run, signal);
const result = raceWithAbort(run, signal);
this.queue = result.then(() => undefined, () => undefined);
return result;
}
private async ensureLoginWindow(): Promise<BrowserWindow> {