The founder probes through provider cooldowns; a served request lifts the park
A single transient failure from a background run used to silence the whole company — founder included — for the full ten-minute cooldown. The interactive lane now claims one probe per park window: the founder's message tries the provider immediately, a success lifts the cooldown for everyone (a served request is proof of health), and a failed probe re-arms the park with the probe spent, so a real outage is never hammered. Autonomous work still waits cooldowns out unconditionally.
This commit is contained in:
1 parent
9246e7e312
commit
75c73ce6f0
3 files changed
+166
-4
No files matched your search
@@ -96,10 +96,14 @@ export function startTaskQueueWorker(input: TaskQueueWorkerInput): () => void {
|
||||
|
||||
const dispatch = (slot: "interactive" | "autonomous"): void => {
|
||||
if (inFlight[slot]) return;
|
||||
// The interactive lane may probe a cooled provider once per park window
|
||||
// (a human is asking; a blip should not cost them ten silent minutes);
|
||||
// autonomous work always waits the cooldown out.
|
||||
const claimed = slot === "interactive"
|
||||
? claimNextQueuedRun(input.connection, taskExecution.cooledProviderIds(), "interactive")
|
||||
? claimNextQueuedRun(input.connection, taskExecution.interactiveCooledProviderIds(), "interactive")
|
||||
: claimNextQueuedRun(input.connection, taskExecution.cooledProviderIds(), "any");
|
||||
if (!claimed) return;
|
||||
if (slot === "interactive" && claimed.provider_id) taskExecution.noteInteractiveProbe(claimed.provider_id);
|
||||
inFlight[slot] = true;
|
||||
notifyDataChanged();
|
||||
void taskExecution.executeRun(claimed.org_id, claimed.id)
|
||||
|
||||
Reference in new issue
Block a user