ExLibrisGroup / alma-print-daemon

Application which listens for and prints letters from the Ex Libris Alma print queues.
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Prevent multiple instances from running for a single user #11

Closed evilsizorm closed 3 years ago

evilsizorm commented 4 years ago

We are working on setting up some automation so that after patching reboots, the Alma Print Daemon restarts automatically. While testing this we ended up with multiple instances of the Daemon running at the same time, which either resulted in multiple printouts of each print job, or it resulted in print queue entries being marked as printed, but no paper coming out.

Please add a detection ability to the Daemon so that if it is running, subsequent attempts to run the daemon will show an error, and refuse to start additional instances.

Thanks

mgobat commented 3 years ago

Planned for next 2.0 beta release.

mgobat commented 3 years ago

This should be fixed in the 2.0 beta.

https://github.com/ExLibrisGroup/alma-print-daemon/releases/tag/v2.0.0-beta-02

jdonaghe commented 3 years ago

Does the message !!!!!!!!!Duplicate instance!!!!!!!!! mean there are multiple instances running at the same time? Does the service stop checking for printouts when this happens?

mgobat commented 3 years ago

Yes, if this message appears, another copy of the daemon is already running. The second copy should terminate, but the originally running copy should continue checking for printouts.