fix(daemon): archied --once drains until callees of a waiting call finish
This commit is contained in:
2 files changed
+30
-5
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user