Commit 8d6ca798 authored by akhuziy's avatar akhuziy
Browse files

added the exit code to job's export info

parent af4f1a2c
......@@ -37,6 +37,11 @@ _info = {
"lsf": "RUN_TIME",
"slurm": "Elapsed",
"regex": "([0-9]+)"},
"exit_code": {"rename": "exit_code",
"type": MType.INT,
"lsf": "EXIT_CODE",
"slurm": "ExitCode",
"regex": "([0-9]+):"},
"requested_time": {"rename": "requested_time",
"type": MType.INT,
"lsf": "RUNTIMELIMIT",
......@@ -213,6 +218,7 @@ def slurm_fetch_alloc_info(job_id):
def parse_job_info_slurm(raw_data, alloc_info):
time_fields = ["submit_time", "start_time", "end_time"]
dur_fields = ["run_time", "requested_time"]
reg_fields = ["exit_code"]
job_info = {}
for m, par in _info.items():
......@@ -229,6 +235,10 @@ def parse_job_info_slurm(raw_data, alloc_info):
else:
job_info[f] = date_to_timestamp(job_info[f], "%Y-%m-%dT%H:%M:%S")
# regexes
for f in reg_fields:
job_info[f] = get_by_regex(job_info[f], _info[f]["regex"])
# slurm times to seconds
for f in dur_fields:
job_info[f] = slurm_time_to_sec(job_info[f])
......
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