commit/galaxy-central: natefoo: Merge stable.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7844d02f9c47/ Changeset: 7844d02f9c47 User: natefoo Date: 2014-10-23 02:47:52+00:00 Summary: Merge stable. Affected #: 2 files diff -r f25e90163bbd16626ce9adf7854ff493c79b469d -r 7844d02f9c4731dcdbf78b99ba810805506a6c05 .hgtags --- a/.hgtags +++ b/.hgtags @@ -20,4 +20,4 @@ ca45b78adb4152fc6e7395514d46eba6b7d0b838 release_2014.08.11 548ab24667d6206780237bd807f7d857a484c461 latest_2014.08.11 2092948937ac30ef82f71463a235c66d34987088 release_2014.10.06 -e1404e285ccb9e52bd09c5827934cd0da1974acc latest_2014.10.06 +a7b2aabb27ffe5cc3216774ab01b18f13b4fc941 latest_2014.10.06 diff -r f25e90163bbd16626ce9adf7854ff493c79b469d -r 7844d02f9c4731dcdbf78b99ba810805506a6c05 lib/galaxy/jobs/runners/slurm.py --- a/lib/galaxy/jobs/runners/slurm.py +++ b/lib/galaxy/jobs/runners/slurm.py @@ -19,13 +19,20 @@ def _complete_terminal_job( self, ajs, drmaa_state, **kwargs ): def __get_jobinfo(): - p = subprocess.Popen( ( 'scontrol', '-o', 'show', 'job', ajs.job_id ), stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + job_id = ajs.job_id + cmd = [ 'scontrol', '-o' ] + if '.' in ajs.job_id: + # custom slurm-drmaa-with-cluster-support job id syntax + job_id, cluster = ajs.job_id.split('.', 1) + cmd.extend( [ '-M', cluster ] ) + cmd.extend( [ 'show', 'job', job_id ] ) + p = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) stdout, stderr = p.communicate() if p.returncode != 0: # Will need to be more clever here if this message is not consistent if stderr == 'slurm_load_jobs error: Invalid job id specified\n': return dict( JobState='NOT_FOUND' ) - raise Exception( '`scontrol -o show job %s` returned %s, stderr: %s' % ( ajs.job_id, p.returncode, stderr ) ) + raise Exception( '`%s` returned %s, stderr: %s' % ( ' '.join( cmd ), p.returncode, stderr ) ) return dict( [ out_param.split( '=', 1 ) for out_param in stdout.split() ] ) if drmaa_state == self.drmaa_job_states.FAILED: try: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org