Reconcile queue state on startup, remove age-based staleness check
Publish Image / publish (push) Successful in 20s
Publish Image / publish (push) Successful in 20s
On boot, query Coder for running workspaces and re-adopt them into the active queue. This prevents 409 conflicts after restarts and ensures callbacks still work for in-flight tasks. On 409: only delete stopped/failed workspaces. Running workspaces are adopted — never killed based on age. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
36c80458e0
commit
ec0b012586
@@ -84,6 +84,11 @@ if (maintenanceRepos.length > 0) {
|
||||
// Start
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Reconcile queue state with Coder before accepting traffic
|
||||
queue.reconcile().catch((err) =>
|
||||
console.error("[startup] reconcile failed:", err),
|
||||
);
|
||||
|
||||
serve({ fetch: app.fetch, port: config.port }, (info) => {
|
||||
console.log(`SDLC Orchestrator listening on :${info.port} (concurrency: ${concurrency})`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user