97 |
|
Get output for a finished job with id. |
98 |
|
""" |
99 |
|
self.checkBeforeGet() |
100 |
< |
common.scheduler.getOutput(1,self.list_id,self.outDir) |
101 |
< |
self.organizeOutput() |
100 |
> |
task= common.scheduler.getOutput(1,self.list_id,self.outDir) |
101 |
> |
self.organizeOutput( task ) |
102 |
|
return |
103 |
|
|
104 |
< |
def organizeOutput(self): |
104 |
> |
def organizeOutput(self, task): |
105 |
|
""" |
106 |
|
Untar Output |
107 |
|
""" |
112 |
|
#os.chdir( self.outDir ) |
113 |
|
success_ret = 0 |
114 |
|
for id in self.list_id: |
115 |
+ |
runningJob = task.getJob( id ).runningJob() |
116 |
+ |
if runningJob.isError() : |
117 |
+ |
continue |
118 |
|
file = 'out_files_'+ str(id)+'.tgz' |
119 |
|
if os.path.exists(self.outDir + file): |
120 |
< |
self.submission_id = common._db.queryRunJob('submission',id) |
120 |
> |
self.submission_id = runningJob['submission'] |
121 |
|
self.max_id=max(self.submission_id) |
122 |
|
if self.max_id > 1: |
123 |
|
for f in os.listdir(self.outDir): |