Skip to content

Commit

Permalink
Remove endTime on retried runs
Browse files Browse the repository at this point in the history
ERROR runs should have an endTime, RUNNING runs shouldn't.
  • Loading branch information
Bj0rnen committed May 13, 2015
1 parent 228381a commit 30f6a31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/spotify/reaper/service/RepairManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ public RepairRun startRepairRun(AppContext context, RepairRun runToBeStarted) {
LOG.info("re-trigger a running run after restart, with id " + runId);
startRunner(context, runId);
return runToBeStarted;
case ERROR: {
case ERROR: {
RepairRun updatedRun = runToBeStarted.with()
.runState(RepairRun.RunState.RUNNING)
.endTime(null)
.build(runToBeStarted.getId());
if (!context.storage.updateRepairRun(updatedRun)) {
throw new RuntimeException("failed updating repair run " + updatedRun.getId());
Expand Down

0 comments on commit 30f6a31

Please sign in to comment.