--fork
and --exec-on-eostudy
, but I haven't seen any solution to the problem.Suppose I want to receive studies from various dicom senders (in my case, it's all people's desktops running OsiriX or Horos). A "study being sent" means the remote connects to storescp on the given port, sends images, and when it's done, disconnects.
When the study is done transferring (which from my point of view means either "they disconnected" or maybe "20 seconds have passed since an image was transferred"), I want to run a program (e.g.
--exec-on-eostudy '/pipe/receiver_eostudy.py #p'
)However, multiple dicom senders may connect to the port simultaneously and send studies.
What is the best way to handle this? The only thing I've been able to think of is an external program which watches directories in
--output-directory
and waits for the mtime on the directory to be more than n seconds ago. But if i can do that, why can't storescp do that itself?