1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-01-03 05:25:28 +00:00

no log: fixed tasks view when running in dev environment (--no-tasks).

This commit is contained in:
morpheus65535 2024-04-29 16:06:34 -04:00
parent 86b889d3b6
commit c5a5dc9ddf

View file

@ -47,6 +47,10 @@ ONE_YEAR_IN_SECONDS = 60 * 60 * 24 * 365
def a_long_time_from_now(job):
# job isn't scheduled at all
if job.next_run_time is None:
return True
# currently defined as more than a year from now
delta = job.next_run_time - datetime.now(job.next_run_time.tzinfo)
return delta.total_seconds() > ONE_YEAR_IN_SECONDS