feat(queue): add jobs table + queue helpers and config (ORCH-1)

Persistent SQLite job queue (F-2b): jobs table + idx, atomic claim_next_job,
enqueue/mark/count/requeue/get helpers. New settings max_concurrency
(ORCH_MAX_CONCURRENCY) and queue_poll_interval (ORCH_QUEUE_POLL_INTERVAL).
This commit is contained in:
Dev Agent
2026-06-02 23:58:44 +03:00
parent b021ff7cb0
commit fd3dac7d22
2 changed files with 183 additions and 0 deletions

View File

@@ -30,6 +30,12 @@ class Settings(BaseSettings):
# DB
db_path: str = "/app/data/orchestrator.db"
# ORCH-1 (F-2b): persistent job queue / background worker.
# max_concurrency -> max agent jobs running in parallel (env ORCH_MAX_CONCURRENCY)
# queue_poll_interval -> worker loop poll seconds (env ORCH_QUEUE_POLL_INTERVAL)
max_concurrency: int = 1
queue_poll_interval: float = 2.0
# Telegram notifications
telegram_bot_token: str = ""