Skip to content

Commit

Permalink
feat: add log to show count of runs updated on replay (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
deryrahman authored Nov 1, 2023
1 parent 6e68725 commit 0392ecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/scheduler/service/replay_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func (w ReplayWorker) processNewReplayRequest(ctx context.Context, replayReq *sc
return err
}

w.l.Info("replay with id %s has updated %d runs", replayReq.Replay.ID().String(), len(updatedRuns))
if err := w.replayRepo.UpdateReplay(ctx, replayReq.Replay.ID(), state, updatedRuns, ""); err != nil {
w.l.Error("unable to update replay state for replay_id [%s]: %s", replayReq.Replay.ID().String(), err)
return err
Expand Down Expand Up @@ -196,6 +197,7 @@ func (w ReplayWorker) processPartialReplayedRequest(ctx context.Context, replayR
replayState = scheduler.ReplayStateReplayed
}

w.l.Info("replay with id %s has updated %d runs", replayReq.Replay.ID().String(), len(updatedRuns))
if err := w.replayRepo.UpdateReplay(ctx, replayReq.Replay.ID(), replayState, updatedRuns, ""); err != nil {
w.l.Error("unable to update replay state for replay_id [%s]: %s", replayReq.Replay.ID().String(), err)
return err
Expand Down Expand Up @@ -248,6 +250,7 @@ func (w ReplayWorker) processReplayedRequest(ctx context.Context, replayReq *sch
w.l.Info("marking replay %s as failed", replayReq.Replay.ID().String())
}

w.l.Info("replay with id %s has updated %d runs", replayReq.Replay.ID().String(), len(updatedRuns))
if err := w.replayRepo.UpdateReplay(ctx, replayReq.Replay.ID(), state, updatedRuns, message); err != nil {
w.l.Error("unable to update replay with replay_id [%s]: %s", replayReq.Replay.ID().String(), err)
return err
Expand Down

0 comments on commit 0392ecb

Please sign in to comment.