Requeue stale AI jobs
All checks were successful
CI / test (push) Successful in 12s
Build and Deploy / build-and-deploy (push) Successful in 27s

This commit is contained in:
Grendgi
2026-06-08 13:54:07 +03:00
parent 24c5d89c7b
commit 59e1073d96
6 changed files with 55 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ type Config struct {
WorkerID string
WorkerPollInterval time.Duration
WorkerClaimLimit int
WorkerLeaseTimeout time.Duration
}
func Load() Config {
@@ -39,6 +40,7 @@ func Load() Config {
WorkerID: envString("WORKER_ID", hostname()),
WorkerPollInterval: envDuration("WORKER_POLL_INTERVAL", 2*time.Second),
WorkerClaimLimit: envInt("WORKER_CLAIM_LIMIT", 4),
WorkerLeaseTimeout: envDuration("WORKER_LEASE_TIMEOUT", 15*time.Minute),
}
}