server/worker/Cargo.toml
vegard 3f8ef65c5f Jobbkø-worker: Rust-binær med polling, concurrency og retry
sidelinja-worker — tokio-basert orkestrator som poller job_queue:
- SELECT FOR UPDATE SKIP LOCKED for trygg concurrent polling
- Semaphore-styrt concurrency (--max-concurrent)
- Eksponentiell backoff: 30s × 2^(attempts-1)
- Handler-registry (HashMap<String, Box<dyn JobHandler>>)
- Strukturert JSON-logging via tracing
- Echo-handler for end-to-end testing
- CLI: --database-url, --ai-gateway-url, --max-concurrent, --poll-interval

Testet mot dev-database: echo-jobb fullført, ukjent type → retry → error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:40:32 +01:00

18 lines
645 B
TOML

[package]
name = "sidelinja-worker"
version = "0.1.0"
edition = "2024"
[dependencies]
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "tls-rustls", "postgres", "uuid", "chrono", "json"] }
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.12", features = ["json"] }
clap = { version = "4", features = ["derive", "env"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
async-trait = "0.1"
anyhow = "1"