fix(spooler): fast start (#1023)

This commit is contained in:
Silvan 2020-11-27 15:32:26 +01:00 committed by GitHub
parent 2331b8a4c0
commit d6c9707ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,10 +50,12 @@ func (s *Spooler) Start() {
}
}(i)
}
for _, handler := range s.handlers {
handler := &spooledHandler{Handler: handler, locker: s.locker, queuedAt: time.Now(), eventstore: s.eventstore}
s.queue <- handler
}
go func() {
for _, handler := range s.handlers {
handler := &spooledHandler{Handler: handler, locker: s.locker, queuedAt: time.Now(), eventstore: s.eventstore}
s.queue <- handler
}
}()
}
func requeueTask(task *spooledHandler, queue chan<- *spooledHandler) {