[Bug 31342] New: process_message_queue can run over the top of itself causing double-up emails
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Bug ID: 31342 Summary: process_message_queue can run over the top of itself causing double-up emails Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: wizzyrea@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz IF a process message queue takes too long and happens to hit the next scheduled run, messages will be duplicated and eventually sent twice. It would be nice to prevent that without changing the cron definition. Liz (PS I am aware of the existence of 15529, Tomas asked me to file this new bug as he has a different idea and didn't want to wade into all of the existing drama around the solution on 15529) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 15529 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 139045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139045&action=edit Bug 31342: Add execution locking to process_message_queue.pl This patch makes the script use an execution lock as provided by Koha::Script. Previous attempt got too complex and contentious, and given we have a simple way to achieve the same thing, I decided to submit an alternative approach. To test: 1. Apply this patch 2. Add the following content to misc/cronjobs/process_message_queue.pl on line 83: sleep 100; 3. Save the file 4. Have two terminals open 5. On the first one, run: $ kshell k$ misc/cronjobs/process_message_queue.pl 6. On the second one, run the same => SUCCESS: The second one dies telling it had to skip the run 7. Undo your changes: $ git checkout misc/cronjobs/process_message_queue.pl 8. Sign off :-D Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139045|0 |1 is obsolete| | --- Comment #3 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 139057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139057&action=edit Bug 31342: Add execution locking to process_message_queue.pl This patch makes the script use an execution lock as provided by Koha::Script. Previous attempt got too complex and contentious, and given we have a simple way to achieve the same thing, I decided to submit an alternative approach. To test: 1. Apply this patch 2. Add the following content to misc/cronjobs/process_message_queue.pl on line 83: sleep 100; 3. Save the file 4. Have two terminals open 5. On the first one, run: $ kshell k$ misc/cronjobs/process_message_queue.pl 6. On the second one, run the same => SUCCESS: The second one dies telling it had to skip the run 7. Undo your changes: $ git checkout misc/cronjobs/process_message_queue.pl 8. Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Liz Rea <liz@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I do not really mind about pushing this dev. But I wonder if we really address the problem here. Could we do something with status in msg queue itself? What now might happen, is not getting a lock for some reason resulting in no mails from the system at all. This sounds worse than receiving two mails to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #5 from Liz Rea <wizzyrea@gmail.com> --- As someone who has experienced both conditions, from the point of view of libraries I've had experience with, they'd rather get no mails than two. Double mails says to library patrons "the library doesn't know what they are doing and their system sucks" - no mail says "the internet is glitchy," which is true. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 --- Comment #6 from Liz Rea <wizzyrea@gmail.com> --- More succinctly: double mail is a PR problem, no mail is less so. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139057|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 140733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140733&action=edit Bug 31342: Add execution locking to process_message_queue.pl This patch makes the script use an execution lock as provided by Koha::Script. Previous attempt got too complex and contentious, and given we have a simple way to achieve the same thing, I decided to submit an alternative approach. To test: 1. Apply this patch 2. Add the following content to misc/cronjobs/process_message_queue.pl on line 83: sleep 100; 3. Save the file 4. Have two terminals open 5. On the first one, run: $ kshell k$ misc/cronjobs/process_message_queue.pl 6. On the second one, run the same => SUCCESS: The second one dies telling it had to skip the run 7. Undo your changes: $ git checkout misc/cronjobs/process_message_queue.pl 8. Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Liz Rea <liz@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- I don't see this as an enhancement so I am backporting it to 22.05.x for the upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 --- Comment #10 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org