Skip to content

Commit 24ef6f4

Browse files
committed
modified: sendit/apps/main/utils.py
1 parent 4af6088 commit 24ef6f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sendit/apps/main/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ def start_queue(subfolder=None, max_count=None, to_storage=True):
154154
started = 0
155155
batch_ids = []
156156
for batch in contenders:
157+
157158
# not seen folders in queue
158159
dicom_dir = batch.logs.get('DICOM_DIR')
159160
if dicom_dir is not None:
160161
import_dicomdir.apply_async(kwargs={"dicom_dir":dicom_dir})
162+
161163
# Run an upload batch every 1000
162164
if to_storage is True:
163165
if len(batch_ids) % 1000 == 0:
@@ -172,6 +174,7 @@ def start_queue(subfolder=None, max_count=None, to_storage=True):
172174
# Upload remaining
173175
if to_storage is True:
174176
upload_storage.apply_async(kwargs={"batch_ids": batch_ids})
177+
upload_storage.apply_async() # any remaining
175178
print("Added %s tasks to the active queue." %started)
176179

177180

0 commit comments

Comments
 (0)