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

@@ -41,12 +41,13 @@ func main() {
}
llmClient := llm.New(cfg.LLMBaseURL, cfg.LLMAPIKey, cfg.LLMModel, cfg.LLMTimeout)
w := worker.New(db, llmClient, cfg.WorkerID, cfg.LLMModel, cfg.WorkerPollInterval, cfg.WorkerClaimLimit)
w := worker.New(db, llmClient, cfg.WorkerID, cfg.LLMModel, cfg.WorkerPollInterval, cfg.WorkerLeaseTimeout, cfg.WorkerClaimLimit)
slog.Info("ai_worker_started",
"worker_id", cfg.WorkerID,
"model", cfg.LLMModel,
"poll_interval", cfg.WorkerPollInterval.String(),
"lease_timeout", cfg.WorkerLeaseTimeout.String(),
"claim_limit", cfg.WorkerClaimLimit,
)
w.Run(ctx)