Skip to content

Commit

Permalink
reset last_id for next time range
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjiang committed Nov 1, 2024
1 parent 537debc commit 6053b1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ezidapp/management/commands/proc-cleanup-async-queues_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ def run(self):
log.info(f"Finished - Checking ref Ids: {time_range_str}")
exit()
else:
log.info(f"Sleep {ASYNC_CLEANUP_SLEEP} seconds before processing next batch")
log.info(f"Sleep {ASYNC_CLEANUP_SLEEP} seconds before processing next time range.")
self.sleep(ASYNC_CLEANUP_SLEEP)
last_id = 0
min_age_ts = max_age_ts
max_age_ts = min_age_ts + ASYNC_CLEANUP_SLEEP
time_range = Q(updateTime__gte=min_age_ts) & Q(updateTime__lte=max_age_ts)
Expand Down

0 comments on commit 6053b1c

Please sign in to comment.