Skip to content

Commit 5a76f22

Browse files
committed
tweaks to pipeline
1 parent 1b8b084 commit 5a76f22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sendit/apps/main/tasks/update.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def replace_identifiers(bid, run_upload_storage=False):
108108
and then trigger the function to send to storage
109109
'''
110110

111-
batch.qa['ProcessStartTime'] = time.time()
112111
batch = Batch.objects.get(id=bid)
112+
batch.qa['ProcessStartTime'] = time.time()
113113
batch_ids = BatchIdentifiers.objects.get(batch=batch)
114114

115115
# 1) use response from API to generate new fields
@@ -129,6 +129,7 @@ def replace_identifiers(bid, run_upload_storage=False):
129129
batch_ids.cleaned = cleaned
130130
batch_ids.updated = updated
131131
batch_ids.save()
132+
132133
# Get updated files
133134
dicom_files = batch.get_image_paths()
134135
output_folder = batch.get_path()
@@ -146,6 +147,7 @@ def replace_identifiers(bid, run_upload_storage=False):
146147
aggregate=aggregate)
147148
batch_ids.shared = shared_ids
148149
batch_ids.save()
150+
149151
# Rename
150152
for dcm in batch.image_set.all():
151153
try:
@@ -174,7 +176,7 @@ def replace_identifiers(bid, run_upload_storage=False):
174176
batch.save()
175177

176178
if run_upload_storage is True:
177-
return upload_storage(bid=bid)
179+
return upload_storage(batch_ids=[bid])
178180
else:
179181
updated_files = batch.get_image_paths()
180182
return updated_files

0 commit comments

Comments
 (0)