Skip to content

Commit

Permalink
fix(manual judgment): switching back to polling to respect timeout ov…
Browse files Browse the repository at this point in the history
…errides
  • Loading branch information
emjburns committed Oct 24, 2017
1 parent 74e47b4 commit 71a6500
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ class ManualJudgmentStage implements StageDefinitionBuilder, RestartableStage, A
final long backoffPeriod = 15000
final long timeout = TimeUnit.DAYS.toMillis(3)

@Override
long getDynamicBackoffPeriod(Duration taskDuration) {
if (taskDuration < Duration.ofMillis(timeout)) {
// task needs to run again right after it should be complete, so add half a second
return Duration.ofMillis(timeout).minus(taskDuration).plus(Duration.ofMillis(500)).toMillis()
} else {
// start polling normally after timeout to account for delays like throttling
return backoffPeriod
}
}

@Autowired(required = false)
EchoService echoService

Expand Down

0 comments on commit 71a6500

Please sign in to comment.