Worker: completely flush upstream buffer at startup
Completely flush the upstream buffer at startup, before attempting to fetch a new task. These updates could impact any task on the Manager side, and first flushing the buffer before appending new updates also seems like a good idea.
This commit is contained in:
parent
90be370095
commit
55d264632f
@ -94,7 +94,8 @@ func main() {
|
||||
|
||||
timeService := clock.New()
|
||||
buffer = upstreamBufferOrDie(client, timeService)
|
||||
go buffer.Flush(workerCtx) // Immediately try to flush any updates.
|
||||
// Flush any updates before actually starting the Worker.
|
||||
buffer.Flush(workerCtx)
|
||||
|
||||
cliRunner := worker.NewCLIRunner()
|
||||
listener = worker.NewListener(client, buffer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user