fix(archied): wait for in-flight tasks on a single-cycle run
A drain pass no longer waits for the tasks it submitted, so -once (the systemd timer and test invocation) returned while their containers were still running and the process then tore them down. Wait for the pass's tasks here, restoring what the flag means.
This commit is contained in:
1 parent
708b1ea502
commit
34bc6865e5
1 file changed
+4
@@ -826,6 +826,10 @@ func (b *boot) runLoop(ctx context.Context, once bool) error {
|
||||
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()
|
||||
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