diff --git a/CHANGELOG.md b/CHANGELOG.md index 81d20a1e..c138538e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support listing directories without resolving UID/GID. - Add description for each parameter in `GET /status/parameters` response. - Add support for Object Storage Tenants in S3v4 object storage. The associated environment variable is `F7T_S3_TENANT` and it can be empty or be `null` or `none` when the tenant is not needed. Otherwise the tenant name has to be set. +- The task that is returned from a successful `GET /jobs/acct` would returns the attribute `time`, which is `cputime` from slurm. The attribute will remain and `cputime` and `elapsed` will be also returned. Similarly, `time_left` is actually the time of termination of the jobs. `time_left` will remain for compatibility reasons, but `elapsed` attribute will also be returned. ## Changed diff --git a/doc/openapi/firecrest-api.yaml b/doc/openapi/firecrest-api.yaml index 9b0fbbab..d7e13cbf 100644 --- a/doc/openapi/firecrest-api.yaml +++ b/doc/openapi/firecrest-api.yaml @@ -2674,6 +2674,12 @@ components: type: string time: type: string + cpu_time: + type: string + elapsed_time: + type: string + termination_time: + type: string time_left: type: string nodes: diff --git a/doc/openapi/firecrest-developers-api.yaml b/doc/openapi/firecrest-developers-api.yaml index d637a25a..c6d5fe75 100644 --- a/doc/openapi/firecrest-developers-api.yaml +++ b/doc/openapi/firecrest-developers-api.yaml @@ -2840,6 +2840,12 @@ components: type: string time: type: string + cpu_time: + type: string + elapsed_time: + type: string + termination_time: + type: string time_left: type: string nodes: diff --git a/src/common/schedulers/slurm.py b/src/common/schedulers/slurm.py index 18c964f8..f56856aa 100644 --- a/src/common/schedulers/slurm.py +++ b/src/common/schedulers/slurm.py @@ -186,7 +186,7 @@ def accounting(self, username=None, jobids=None, start_time=None, end_time=None) # --parsable2 = limits with | character not ending with it cmd += [ - "--format='jobid,partition,jobname,user,state,start,cputime,end,NNodes,NodeList,ExitCode'", + "--format='jobid,partition,jobname,user,state,start,cputime,end,NNodes,NodeList,ExitCode,elapsed'", "--noheader", "--parsable2", ] @@ -206,6 +206,9 @@ def parse_accounting_output(self, output): "state": job_info[4], "start_time": job_info[5], "time": job_info[6], + "cpu_time": job_info[6], + "elapsed_time": job_info[11], + "termination_time": job_info[7], "time_left": job_info[7], "nodes": job_info[8], "nodelist": job_info[9],