Commit ea1f7eee authored by David Mendez's avatar David Mendez
Browse files

Make last checked at time timezone aware

parent 44bb0662
......@@ -218,7 +218,8 @@ class DelayedJob(DB.Model):
lsf_script_errored = self.last_lsf_check_status != 0
death_assumption_seconds = RUN_CONFIG.get('status_agent').get('death_assumption_seconds')
checker_assumed_dead_time = app_utils.get_utc_now() - datetime.timedelta(seconds=death_assumption_seconds)
checker_is_assumed_dead = self.last_lsf_checked_at < checker_assumed_dead_time
checker_is_assumed_dead = self.last_lsf_checked_at.replace(
tzinfo=datetime.timezone.utc) < checker_assumed_dead_time
return lsf_script_errored and checker_is_assumed_dead
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment