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

Write lsf status check log to file instead of database

parent bb3cf34c
......@@ -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'
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):
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