Skip to content

Commit 59423df

Browse files
committed
feat(resources): spool SSH+Condor job inputs/outputs
1 parent c53246f commit 59423df

File tree

1 file changed

+16
-1
lines changed
  • src/DIRAC/Resources/Computing/BatchSystems

1 file changed

+16
-1
lines changed

src/DIRAC/Resources/Computing/BatchSystems/Condor.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def submitJob(self, **kwargs):
167167
jdlFile.flush()
168168

169169
cmd = "%s; " % preamble if preamble else ""
170-
cmd += "condor_submit %s" % jdlFile.name
170+
cmd += "condor_submit -spool %s" % jdlFile.name
171171
sp = subprocess.Popen(
172172
cmd,
173173
shell=True,
@@ -399,6 +399,21 @@ def getJobOutputFiles(self, **kwargs):
399399
jobDict = {}
400400
for jobID in jobIDList:
401401
jobDict[jobID] = {}
402+
403+
cmd = "condor_transfer_data %s" % jobID
404+
sp = subprocess.Popen(
405+
shlex.split(cmd),
406+
stdout=subprocess.PIPE,
407+
stderr=subprocess.PIPE,
408+
universal_newlines=True,
409+
)
410+
_, error = sp.communicate()
411+
status = sp.returncode
412+
if status != 0:
413+
resultDict["Status"] = -1
414+
resultDict["Message"] = error
415+
return resultDict
416+
402417
jobDict[jobID]["Output"] = "%s/%s.out" % (outputDir, jobID)
403418
jobDict[jobID]["Error"] = "%s/%s.err" % (errorDir, jobID)
404419

0 commit comments

Comments
 (0)