radical-cybertools/saga-python — pull request #322 by luis-rr (2014-05-08 14:17:01+00:00)
Title: slurm get job state

There's two small problems when getting the state of a job that has been run on a slurm queue:
1- If the job got cancelled externally, saga is not picking up the new state due to a typo (it works if cancelling via saga because we directly set the state in job.cancel())

2 - If the job state hasn't been queried for long enough, slurm removes it from the loaded data and scontrol cannot find it anymore. This seems to be a poorly documented slurm feature. There's a mention of it here: https://gitlab.com/sol/mc2-agent/issues/8

However, sacct does have access to the history of all run jobs and can provide the correct state.