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
1 changed files with 4 additions and 0 deletions

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