diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-09 04:24:06 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-09 04:24:06 +0000 |
| commit | 91595726d696ef8bdc8c3ef0a39a1d3a7be34408 (patch) | |
| tree | 71d885f13d5209170a10913c69f2dde9e7703b1b /internal/cli | |
| parent | 02851c000399a0a9fa1cee3a6d6695de00661dab (diff) | |
executor: recover stale RUNNING tasks on server startup
On restart, any tasks in RUNNING state have no active goroutine.
RecoverStaleRunning() marks them FAILED (retryable) and closes
their open execution records with an appropriate error message.
Called once from serve.go after the pool is created.
Diffstat (limited to 'internal/cli')
| -rw-r--r-- | internal/cli/serve.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/cli/serve.go b/internal/cli/serve.go index e90c3e2..4253d56 100644 --- a/internal/cli/serve.go +++ b/internal/cli/serve.go @@ -71,6 +71,7 @@ func serve(addr string) error { if cfg.GeminiBinaryPath != "" { pool.Classifier = &executor.Classifier{GeminiBinaryPath: cfg.GeminiBinaryPath} } + pool.RecoverStaleRunning() srv := api.NewServer(store, pool, logger, cfg.ClaudeBinaryPath, cfg.GeminiBinaryPath) if cfg.WebhookURL != "" { |
