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: