@@ -157,15 +157,15 @@ def submitJob(self, **kwargs):
157157 holdReasonSubcode = HOLD_REASON_SUBCODE ,
158158 daysToKeepRemoteLogs = 1 ,
159159 scheddOptions = "" ,
160- extraString = "" ,
160+ extraString = submitOptions ,
161161 pilotStampList = "," .join (stamps ),
162162 )
163163 )
164164
165165 jdlFile .flush ()
166166
167167 cmd = "%s; " % preamble if preamble else ""
168- cmd += "condor_submit %s %s " % ( submitOptions , jdlFile .name )
168+ cmd += "condor_submit %s -spool " % jdlFile .name
169169 sp = subprocess .Popen (
170170 cmd ,
171171 shell = True ,
@@ -375,3 +375,43 @@ def getCEStatus(self, **kwargs):
375375 resultDict ["Waiting" ] += 1
376376
377377 return resultDict
378+
379+ def getJobOutputFiles (self , ** kwargs ):
380+ """Get output file names and templates for the specific CE"""
381+ resultDict = {}
382+
383+ MANDATORY_PARAMETERS = ["JobIDList" , "OutputDir" , "ErrorDir" ]
384+ for argument in MANDATORY_PARAMETERS :
385+ if argument not in kwargs :
386+ resultDict ["Status" ] = - 1
387+ resultDict ["Message" ] = "No %s" % argument
388+ return resultDict
389+
390+ outputDir = kwargs ["OutputDir" ]
391+ errorDir = kwargs ["ErrorDir" ]
392+ jobIDList = kwargs ["JobIDList" ]
393+
394+ cmd = "condor_transfer_data"
395+ sp = subprocess .Popen (
396+ shlex .split (cmd ),
397+ stdout = subprocess .PIPE ,
398+ stderr = subprocess .PIPE ,
399+ universal_newlines = True ,
400+ )
401+ _ , error = sp .communicate ()
402+ status = sp .returncode
403+
404+ if status != 0 :
405+ resultDict ["Status" ] = - 1
406+ resultDict ["Message" ] = error
407+ return resultDict
408+
409+ jobDict = {}
410+ for jobID in jobIDList :
411+ jobDict [jobID ] = {}
412+ jobDict [jobID ]["Output" ] = "%s/%s.out" % (outputDir , jobID )
413+ jobDict [jobID ]["Error" ] = "%s/%s.err" % (errorDir , jobID )
414+
415+ resultDict ["Status" ] = 0
416+ resultDict ["Jobs" ] = jobDict
417+ return resultDict
0 commit comments