Commit 0474cb87 authored by David Mendez's avatar David Mendez
Browse files

Make sure to use app standard utc now for the last lsf checked at.

parent 9d453f1e
......@@ -164,7 +164,7 @@ def get_status_script_output(job_id, checker_name, script_path):
check_msg = f'script return code was: {return_code}'
delayed_job_models.append_to_lsf_check_log(job_id, checker_name, check_msg)
delayed_job_models.set_last_lsf_check_status(job_id, return_code)
delayed_job_models.set_last_lsf_checked_at(job_id, datetime.datetime.utcnow())
if return_code not in [0, 255]:
......@@ -510,14 +510,13 @@ def set_last_lsf_check_status(job_id, script_status):
def set_last_lsf_checked_at(job_id, last_lsf_checked_at):
def set_last_lsf_checked_at(job_id):
Sets the last time the job was checked in lsf
:param job_id: id of the job to modify
:param last_lsf_checked_at: last time when the job was checked
job = get_job_by_id(job_id)
job.last_lsf_checked_at = last_lsf_checked_at
job.last_lsf_checked_at = app_utils.get_utc_now()
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