Hello everyone,
I am developing a web application that integrates with orthanc and I am having trouble with using a python script that fires on the event of recieving a new instance that notifies my web app of a new instance.
My web app runs an ai model and produces a new dicom file (if the ai output has findings) when it recieves the new instance and this is when the deadlock emerges because the new dicom file is sent to orthanc and thus fires the onstored instance again ( I knew this deadlock is mentioned in the docs ) and so I use a python thread to send the generated dicom to orthanc and this solves the problem but I am wondering if anyone has better ideas to mitigate this issue because I feel like this might be bad practice/design because using a thread for the generation task doesn’t allow me to check if what the thread returned in case an error happens or a problem occurs.
Thank you if you’ve made it this far and please give me any suggestions about how you would deal with this.