mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Bugfix for the DRMAA job name commit, ensure all characters in the job name string conform to the DRMAA spec.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import os, sys, logging, threading, time
|
||||
import os, sys, logging, threading, time, string
|
||||
import pprint, pwd
|
||||
from pwd import getpwnam
|
||||
import subprocess
|
||||
@@ -168,9 +168,12 @@ class DRMAAJobRunner( BaseJobRunner ):
|
||||
# define job attributes
|
||||
ofile = "%s.drmout" % os.path.join(job_wrapper.working_directory, job_wrapper.get_id_tag())
|
||||
efile = "%s.drmerr" % os.path.join(job_wrapper.working_directory, job_wrapper.get_id_tag())
|
||||
job_name = "g%s_%s_%s" % ( job_wrapper.job_id, job_wrapper.tool.id, job_wrapper.user )
|
||||
job_name = ''.join( map( lambda x: x if x in ( string.letters + string.digits + '_' ) else '_', job_name ) )
|
||||
|
||||
jt = self.ds.createJobTemplate()
|
||||
jt.remoteCommand = "%s/galaxy_%s.sh" % (self.app.config.cluster_files_directory, job_wrapper.get_id_tag())
|
||||
jt.jobName = "g%s_%s_%s" % ( job_wrapper.job_id, job_wrapper.tool.id, job_wrapper.user.replace( '@', '__at__' ) )
|
||||
jt.jobName = job_name
|
||||
jt.outputPath = ":%s" % ofile
|
||||
jt.errorPath = ":%s" % efile
|
||||
native_spec = self.get_native_spec( runner_url )
|
||||
|
||||
Reference in New Issue
Block a user