Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ChEMBL
C
ChEMBL
Delayed Jobs
Delayed Jobs API
Commits
ec1764aa
Commit
ec1764aa
authored
Apr 07, 2021
by
David Mendez
Browse files
Write lsf status check log to file instead of database
parent
bb3cf34c
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/models/delayed_job_models.py
app/models/delayed_job_models.py
+4
-4
No files found.
app/models/delayed_job_models.py
View file @
ec1764aa
...
...
@@ -7,6 +7,7 @@ import hashlib
import
json
import
shutil
import
copy
import
os
from
sqlalchemy
import
and_
...
...
@@ -506,11 +507,10 @@ def append_to_lsf_check_log(job_id, checker_name, check_log):
:param check_log: text to append
"""
job
=
get_job_by_id
(
job_id
)
if
job
.
lsf_check_log
is
None
:
job
.
lsf_check_log
=
''
job
.
lsf_check_log
+=
f
'
{
app_utils
.
get_utc_now
().
isoformat
()
}
-
{
checker_name
}
:
{
check_log
}
\n
'
save_job
(
job
)
log_file_path
=
os
.
path
.
join
(
job
.
run_dir_path
,
'status_check_log.txt'
)
with
open
(
log_file_path
,
"a"
)
as
log_file
:
log_file
.
write
(
f
'
{
app_utils
.
get_utc_now
().
isoformat
()
}
-
{
checker_name
}
:
{
check_log
}
\n
'
)
def
set_last_lsf_check_status
(
job_id
,
script_status
):
...
...
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