47
// Stop signals running tasks to stop, aborts any pending tasks and waits up to a minute for all running tasks to
48
// complete.
50
>
if !s.stopped.CompareAndSwap(false, true) {
51
return
52
}
54
>
for _, lim := range s.schedulers {
55
lim.InitiateShutdown()
56
}
58
>
59
>
if success := common.BlockWithTimeout(s.waitShutdown, time.Minute); !success {
60
s.options.Logger.Warn("GroupByScheduler timed out waiting for groups to complete shutdown")
62
>
s.options.Logger.Debug("GroupByScheduler shutdown complete")
63
>
}
64
}
65
67
>
for _, lim := range s.schedulers {
68
lim.WaitShutdown()
69
}