From c34e6f3bf6bf1b5ec189aa1f2aa1581a465e7795 Mon Sep 17 00:00:00 2001 From: Tatiana Korchuganova Date: Fri, 30 Aug 2024 15:15:32 +0200 Subject: [PATCH] task profile | remove merging from job final statuses list --- core/constants.py | 3 +-- core/libs/job.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/constants.py b/core/constants.py index 75e4346a..a0dd1f1d 100644 --- a/core/constants.py +++ b/core/constants.py @@ -57,8 +57,7 @@ 'finished', 'failed', 'cancelled', - 'closed', - 'merging' + 'closed' ) EVENT_STATES = MappingProxyType({ diff --git a/core/libs/job.py b/core/libs/job.py index 73aeb2bc..ccf58c99 100644 --- a/core/libs/job.py +++ b/core/libs/job.py @@ -111,7 +111,7 @@ def get_job_walltime(job): endtime = parse_datetime(job['endtime']) if not isinstance(job['endtime'], datetime) else job['endtime'] if endtime is None: - if 'jobstatus' in job and job['jobstatus'] not in const.JOB_STATES_FINAL: + if 'jobstatus' in job and job['jobstatus'] not in (const.JOB_STATES_FINAL + ('merging',)): # for active job take time up to now endtime = datetime.now() else: