Skip to content

Commit

Permalink
Interval schedule should take start time from the request, should not…
Browse files Browse the repository at this point in the history
… set it to the current time of request execution.

Signed-off-by: Oleg Kravchuk <oleg.ikibo@gmail.com>
  • Loading branch information
ikibo committed Nov 14, 2023
1 parent 6810b0c commit f62b77a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ data class Rollup(
// TODO: Make startTime public in Job Scheduler so we can just directly check the value
if (seqNo == SequenceNumbers.UNASSIGNED_SEQ_NO || primaryTerm == SequenceNumbers.UNASSIGNED_PRIMARY_TERM) {
if (schedule is IntervalSchedule) {
schedule = IntervalSchedule(Instant.now(), schedule.interval, schedule.unit, schedule.delay ?: 0)
schedule = IntervalSchedule(schedule.startTime, schedule.interval, schedule.unit, schedule.delay ?: 0)
}
}
return Rollup(
Expand Down

0 comments on commit f62b77a

Please sign in to comment.