mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-21 16:31:43 +02:00
fix(task): revert to context based approach and fix tasks stuck, improve error handling
This commit is contained in:
@@ -155,10 +155,11 @@ func (p *Poller[T, AggregateT]) Start() {
|
||||
gatherErrsTicker.Stop()
|
||||
saveTicker.Stop()
|
||||
|
||||
if err := p.save(); err != nil {
|
||||
err := p.save()
|
||||
if err != nil {
|
||||
l.Err(err).Msg("failed to save metrics data")
|
||||
}
|
||||
t.Finish(nil)
|
||||
t.Finish(err)
|
||||
}()
|
||||
|
||||
l.Debug().Dur("interval", pollInterval).Msg("Starting poller")
|
||||
|
||||
Reference in New Issue
Block a user