Skip to content

Commit

Permalink
Fix timezone bug (#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max authored and nmanovic committed Dec 27, 2019
1 parent 204503e commit 4d730c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,9 @@ def dataset_export(self, request, pk):

rq_job = queue.fetch_job(rq_id)
if rq_job:
task_time = timezone.localtime(db_task.updated_date)
request_time = rq_job.meta.get('request_time',
timezone.make_aware(datetime.min))
if request_time < task_time:
last_task_update_time = timezone.localtime(db_task.updated_date)
request_time = rq_job.meta.get('request_time', None)
if request_time is None or request_time < last_task_update_time:
rq_job.cancel()
rq_job.delete()
else:
Expand Down

0 comments on commit 4d730c7

Please sign in to comment.