Decouple generation job polling from key-balance polling #4

Open
opened 2026-03-10 14:40:53 +03:00 by sirily · 0 comments
Owner

Problem
apps/worker/src/main.ts uses KEY_BALANCE_POLL_SECONDS as the main worker loop interval for generation processing.

Why this matters
With the current default (180s), newly queued generation requests can wait minutes before the worker sees them, which breaks the intended near-synchronous polling UX.

Acceptance criteria

  • Generation job polling has its own short cadence or blocking queue mechanism.
  • Provider-key balance polling runs on a separate schedule.
  • The default configuration processes queued jobs quickly without waiting for balance poll intervals.
Problem `apps/worker/src/main.ts` uses `KEY_BALANCE_POLL_SECONDS` as the main worker loop interval for generation processing. Why this matters With the current default (`180s`), newly queued generation requests can wait minutes before the worker sees them, which breaks the intended near-synchronous polling UX. Acceptance criteria - Generation job polling has its own short cadence or blocking queue mechanism. - Provider-key balance polling runs on a separate schedule. - The default configuration processes queued jobs quickly without waiting for balance poll intervals.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sirily/nroxy#4