Skip to content

Commit

Permalink
Don't run archiving if crawlAndPostprocess failed
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwarden committed Nov 25, 2024
1 parent e3c50f3 commit 7ff4846
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7ff4846

Please sign in to comment.