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
35b9219d
Commit
35b9219d
authored
Apr 07, 2021
by
David Mendez
Browse files
If job run dir path is none, print lsf check log to app logging
parent
ec1764aa
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
app/models/delayed_job_models.py
app/models/delayed_job_models.py
+5
-1
No files found.
app/models/delayed_job_models.py
View file @
35b9219d
...
@@ -507,10 +507,14 @@ def append_to_lsf_check_log(job_id, checker_name, check_log):
...
@@ -507,10 +507,14 @@ def append_to_lsf_check_log(job_id, checker_name, check_log):
:param check_log: text to append
:param check_log: text to append
"""
"""
job
=
get_job_by_id
(
job_id
)
job
=
get_job_by_id
(
job_id
)
log_msg
=
f
'
{
app_utils
.
get_utc_now
().
isoformat
()
}
-
{
checker_name
}
:
{
check_log
}
\n
'
if
job
.
run_dir_path
is
None
:
app_logging
.
debug
(
log_msg
)
return
log_file_path
=
os
.
path
.
join
(
job
.
run_dir_path
,
'status_check_log.txt'
)
log_file_path
=
os
.
path
.
join
(
job
.
run_dir_path
,
'status_check_log.txt'
)
with
open
(
log_file_path
,
"a"
)
as
log_file
:
with
open
(
log_file_path
,
"a"
)
as
log_file
:
log_file
.
write
(
f
'
{
app_utils
.
get_utc_now
().
isoformat
()
}
-
{
checker_name
}
:
{
check_log
}
\n
'
)
log_file
.
write
(
log_msg
)
def
set_last_lsf_check_status
(
job_id
,
script_status
):
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