mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-19 13:21:58 +08:00
Run aggregator on the server
This commit is contained in:
@@ -82,12 +82,18 @@ func newAggregator(params aggregatorParams) *aggregator {
|
||||
}
|
||||
|
||||
func (a *aggregator) shutdown() {
|
||||
if a.aggregateFunc == nil {
|
||||
return
|
||||
}
|
||||
a.logger.Debug("Aggregator shutting down...")
|
||||
// Signal the aggregator goroutine to stop.
|
||||
a.done <- struct{}{}
|
||||
}
|
||||
|
||||
func (a *aggregator) start(wg *sync.WaitGroup) {
|
||||
if a.aggregateFunc == nil {
|
||||
return
|
||||
}
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
Reference in New Issue
Block a user