Skip to content

Commit

Permalink
Fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Mar 23, 2021
1 parent 65c94fc commit 0d564af
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def merge(
# the finish time of the last entry.
run = self.find_last_by_id(schedule.id)
if run is not None:
next_time = run.end_time
next_time = run.end_time + granularity_time()
else:
next_time = time
if next_time < last_date:
Expand All @@ -708,7 +708,7 @@ def merge(

if len(dates) > 0:
ns = min(dates)
if ns < last_date:
if ns != end_of_time and ns < last_date:
# There might be overlapping schedules. Add them all.
for i, d in enumerate(dates):
if d == ns:
Expand Down

0 comments on commit 0d564af

Please sign in to comment.