mirror of https://github.com/morpheus65535/bazarr
no log: fixed tasks view when running in dev environment (--no-tasks).
This commit is contained in:
parent
86b889d3b6
commit
c5a5dc9ddf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue