Skip to content

Commit 1dab2a1

Browse files
authored
Merge pull request #1067 from scitran/analysis-job-update
Remove unnecessary analysis input file update
2 parents 4fb0b11 + 3d39f43 commit 1dab2a1

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

api/dao/containerstorage.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -404,22 +404,9 @@ def inflate_job_info(self, analysis):
404404
if next_job is None:
405405
break
406406
job = Job.load(next_job)
407-
if job.id_ != str(analysis['job']):
407+
if job.id_ != analysis['job']:
408408
# Update analysis if job has changed
409-
# Remove old inputs and replace with new job inputs
410-
# (In practice these should never change)
411-
files = analysis.get('files', [])
412-
files[:] = [x for x in files if x.get('output')]
413-
414-
for i in getattr(job, 'inputs',{}):
415-
fileref = job.inputs[i]
416-
contref = containerutil.create_containerreference_from_filereference(job.inputs[i])
417-
file_ = contref.find_file(fileref.name)
418-
if file_:
419-
file_['input'] = True
420-
files.append(file_)
421-
422-
self.update_el(analysis['_id'], {'job': job.id_, 'files': files})
409+
self.update_el(analysis['_id'], {'job': job.id_})
423410

424411
analysis['job'] = job
425412
return analysis

0 commit comments

Comments
 (0)