Skip to content

Commit 24e6e1a

Browse files
committed
Add delay between calling C-STORE and updating worklist item status
There's a possible race condition where the C-STORE command updates the worklist item to IN PROGRESS after we attempt to move it to COMPLETED.
1 parent b9ad112 commit 24e6e1a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/modality_emulator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def process_worklist_items(self, ae: AE):
154154
)
155155
series_number += 1
156156

157+
time.sleep(1) # Allow C-STORE operations to complete before updating status
158+
157159
self.mwl_storage.update_status(accession_number, MWLStatus.COMPLETED.value)
158160
logger.info(f"Completed processing for worklist item {accession_number}")
159161
elif status_code == SUCCESS:

0 commit comments

Comments
 (0)