mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_18.01' into release_18.05
This commit is contained in:
+2
-1
@@ -128,7 +128,8 @@ def _build_attributes_table(tag, attributes, hide_attributes=False, attribute_na
|
||||
|
||||
use = attribute.attrib.get("use", "optional") == "required"
|
||||
if "|" in details:
|
||||
raise Exception("Cannot build Markdown table")
|
||||
# This seems to work fine for now, but potentially can cause problems.
|
||||
pass
|
||||
details = details.replace("\n", " ").strip()
|
||||
best_practices = _get_bp_link(annotation_el)
|
||||
if best_practices:
|
||||
|
||||
@@ -37,7 +37,7 @@ class SlurmJobRunner(DRMAAJobRunner):
|
||||
|
||||
def _complete_terminal_job(self, ajs, drmaa_state, **kwargs):
|
||||
def _get_slurm_state_with_sacct(job_id, cluster):
|
||||
cmd = ['sacct', '-n', '-o state%-32']
|
||||
cmd = ['sacct', '-n', '-o', 'state%-32']
|
||||
if cluster:
|
||||
cmd.extend(['-M', cluster])
|
||||
cmd.extend(['-j', job_id])
|
||||
@@ -77,7 +77,20 @@ class SlurmJobRunner(DRMAAJobRunner):
|
||||
return job_state
|
||||
return 'NOT_FOUND'
|
||||
raise Exception('`%s` returned %s, stderr: %s' % (' '.join(cmd), p.returncode, stderr))
|
||||
job_info_dict = dict([out_param.split('=', 1) for out_param in stdout.split()])
|
||||
stdout = stdout.strip()
|
||||
# stdout is a single line in format "key1=value1 key2=value2 ..."
|
||||
job_info_keys = []
|
||||
job_info_values = []
|
||||
for job_info in stdout.split():
|
||||
try:
|
||||
# Some value may contain `=` (e.g. `StdIn=StdIn=/dev/null`)
|
||||
k, v = job_info.split('=', 1)
|
||||
job_info_keys.append(k)
|
||||
job_info_values.append(v)
|
||||
except ValueError:
|
||||
# Some value may contain spaces (e.g. `Comment=** time_limit (60m) min_nodes (1) **`)
|
||||
job_info_values[-1] += ' ' + job_info
|
||||
job_info_dict = dict(zip(job_info_keys, job_info_values))
|
||||
return job_info_dict['JobState']
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user