@@ -167,7 +167,7 @@ def submitJob(self, **kwargs):
167
167
jdlFile .flush ()
168
168
169
169
cmd = "%s; " % preamble if preamble else ""
170
- cmd += "condor_submit %s" % jdlFile .name
170
+ cmd += "condor_submit -spool %s" % jdlFile .name
171
171
sp = subprocess .Popen (
172
172
cmd ,
173
173
shell = True ,
@@ -286,10 +286,12 @@ def getJobStatus(self, **kwargs):
286
286
output , error = sp .communicate ()
287
287
status = sp .returncode
288
288
289
- if status != 0 or not output :
289
+ if status != 0 :
290
290
resultDict ["Status" ] = status
291
291
resultDict ["Message" ] = error
292
292
return resultDict
293
+ if not output :
294
+ output = "[]"
293
295
294
296
jobsMetadata = json .loads (output )
295
297
@@ -304,10 +306,12 @@ def getJobStatus(self, **kwargs):
304
306
output , _ = sp .communicate ()
305
307
status = sp .returncode
306
308
307
- if status != 0 or not output :
309
+ if status != 0 :
308
310
resultDict ["Status" ] = status
309
311
resultDict ["Message" ] = error
310
312
return resultDict
313
+ if not output :
314
+ output = "[]"
311
315
312
316
jobsMetadata += json .loads (output )
313
317
@@ -399,6 +403,21 @@ def getJobOutputFiles(self, **kwargs):
399
403
jobDict = {}
400
404
for jobID in jobIDList :
401
405
jobDict [jobID ] = {}
406
+
407
+ cmd = "condor_transfer_data %s" % jobID
408
+ sp = subprocess .Popen (
409
+ shlex .split (cmd ),
410
+ stdout = subprocess .PIPE ,
411
+ stderr = subprocess .PIPE ,
412
+ universal_newlines = True ,
413
+ )
414
+ _ , error = sp .communicate ()
415
+ status = sp .returncode
416
+ if status != 0 :
417
+ resultDict ["Status" ] = - 1
418
+ resultDict ["Message" ] = error
419
+ return resultDict
420
+
402
421
jobDict [jobID ]["Output" ] = "%s/%s.out" % (outputDir , jobID )
403
422
jobDict [jobID ]["Error" ] = "%s/%s.err" % (errorDir , jobID )
404
423
0 commit comments