Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ChEMBL
C
ChEMBL
Delayed Jobs
Delayed Jobs API
Commits
ea1f7eee
Commit
ea1f7eee
authored
Apr 01, 2021
by
David Mendez
Browse files
Make last checked at time timezone aware
parent
44bb0662
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app/models/delayed_job_models.py
app/models/delayed_job_models.py
+2
-1
No files found.
app/models/delayed_job_models.py
View file @
ea1f7eee
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment