fix(daemon): archied --once drains until callees of a waiting call finish

This commit is contained in:
sam committed 2026-10-25 02:46:16 +11:00
1 parent 6f0ea530aa
commit d2cbe25814
2 files changed
+30 -5

No files matched your search

+1 -5
View File
@@ -795,11 +795,7 @@ func (b *boot) runLoop(ctx context.Context, once bool) error {
b.health.markServing()
b.announceReady()
if once {
b.d.Cycle(ctx)
// A drain pass no longer waits for the tasks it submitted, so a
// single-cycle invocation waits for them here: exiting while their
// containers still run would kill work this pass accepted.
b.d.WaitForTasks()
b.d.RunOnce(ctx)
return nil
}
b.log.Info("archied running", "repos", len(b.cfg.Repos), "poll", b.cfg.PollInterval.Std().String(), "label", b.cfg.Label)