Wondering if there is a way to capture completion of a job within a Python Plug-in ?
- Scenario is when running a job asynchronously, such as one of these:
- Modifying and anonymizing DICOM instances.
- Creating ZIP or media archives.
- C-Move SCU (/queries/…/retrieve).
- C-Store SCU (/modalities/…/store).
- Sending to an Orthanc peer (/peers/…/store).
- Split/merge.
- Sending images using the transfers accelerator plugin.
If run asynchronously, there are cases when it would be useful to perform some sort of clean-up task after the job is completed (e.g. reconstruction, RIS DB updates, etc.). If there were a “ChangeType_JobFinished/Completed” ChangeType that could be captured in a Python Plug-in, then the clean-up could be handled by the plug-in. Otherwise, seems like there would have to be a polling mechanism or some sort of web hook setup to deal with that.
Thanks.