diff --git a/main.go b/main.go index 5b019ce..1542a5a 100644 --- a/main.go +++ b/main.go @@ -155,15 +155,15 @@ func (app app) mainLoop(ctx context.Context) { if err = app.crawlAndPostprocess(ctx); err != nil { logger.Error("crawlAndPostprocess", err) - } + } else { + app.logger.Debug("Finished crawl and postprocess") - err := app.archiveOldStatsData(ctx) - if err != nil { - app.logger.Error("archiveOldStatsData", err) + err := app.archiveOldStatsData(ctx) + if err != nil { + app.logger.Error("archiveOldStatsData", err) + } } - app.logger.Debug("Finished crawl and postprocess") - case <-ctx.Done(): return }