[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 11:56:55 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31342

--- Comment #2 from Tomás Cohen Arazi <tomascohen at 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.


More information about the Koha-bugs mailing list