Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
Source code for galaxy.jobs.runners.util.cli.job.slurm_torque
import re
from .torque import Torque
__all__ = ("SlurmTorque",)
[docs]class SlurmTorque(Torque):
"""A CLI job executor for Slurm's Torque compatibility mode. This differs
from real torque CLI in that -x command line is not available so job status
needs to be parsed from qstat table instead of XML.
"""
[docs] def parse_status(self, status, job_ids):
rval = {}
for line in status.strip().splitlines():
if line.startswith("Job ID"):
continue
line_parts = re.compile(r"\s+").split(line)
if len(line_parts) < 5:
continue
id = line_parts[0]
state = line_parts[4]
if id in job_ids:
# map PBS job states to Galaxy job states.
rval[id] = self._get_job_state(state)
return rval