[Koha-bugs] [Bug 31342] process_message_queue can run over the top of itself causing double-up emails
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Aug 12 16:31:57 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342
Liz Rea <wizzyrea at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #139045|0 |1
is obsolete| |
--- Comment #3 from Liz Rea <wizzyrea at 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 at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list