[Bug 31453] New: Add ability to skip processing messages in message queue based on message contents
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Bug ID: 31453 Summary: Add ability to skip processing messages in message queue based on message contents Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. -- 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=31453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=31453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 139736 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139736&action=edit Bug 31453: Add ability to skip processing messages in message queue based on message contents It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. Test Plan: 1) Apply this patch 2) Queue two messages, each with a unique word 3) Run process_message_queue --content-not-like "WORD" where WORD is a unique word in one of the two message 4) Note the message containing "WORD" was not processed 5) prove t/db_dependent/Letters.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139736|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 139828 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139828&action=edit Bug 31453: Add ability to skip processing messages in message queue based on message contents It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. Test Plan: 1) Apply this patch 2) Queue two messages, each with a unique word 3) Run process_message_queue --content-not-like "WORD" where WORD is a unique word in one of the two message 4) Note the message containing "WORD" was not processed 5) prove t/db_dependent/Letters.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add ability to skip |Add ability to filter |processing messages in |messages to process using |message queue based on |process_message_queue.pl |message contents |via a command line | |parameter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139828|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 142895 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142895&action=edit Bug 31453: Add ability to filter messages to process using process_message_queue.pl via a command line parameter It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. Test Plan: 1) Apply this patch 2) Queue two messages, each with a unique word 3) Run process_message_queue --where "content NOT LIKE '%WORD%'" where WORD is a unique word in one of the two message 4) Note the message containing "WORD" was not processed 5) prove t/db_dependent/Letters.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Andrew Fuerste-Henry <andrewfh@dubcolib.org> 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=31453 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142895|0 |1 is obsolete| | --- Comment #4 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Created attachment 145756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145756&action=edit Bug 31453: Add ability to filter messages to process using process_message_queue.pl via a command line parameter It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. Test Plan: 1) Apply this patch 2) Queue two messages, each with a unique word 3) Run process_message_queue --where "content NOT LIKE '%WORD%'" where WORD is a unique word in one of the two message 4) Note the message containing "WORD" was not processed 5) prove t/db_dependent/Letters.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145756|0 |1 is obsolete| | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 147478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147478&action=edit Bug 31453: Add ability to filter messages to process using process_message_queue.pl via a command line parameter It would be very useful to be able to tell process_message_queue.pl to skip processing some messages. This is particularly useful where a plugin handles sending some message using the before_send_messages hook, but while that plugin is processing, more messages meant for the plugin might be queued. At that point, control moves back to the script and SendQueuedMessages is called, and those messages end up being processed there instead of by the plugin. Test Plan: 1) Apply this patch 2) Queue two messages, each with a unique word 3) Run process_message_queue --where "content NOT LIKE '%WORD%'" where WORD is a unique word in one of the two message 4) Note the message containing "WORD" was not processed 5) prove t/db_dependent/Letters.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |victor@tuxayo.net --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. 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=31453 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I am stumbling over this while doing changes in SendQueuedMessages on bug 33360. I would need to convert the SQL condition into DBIx constructs since I am switching to a Koha object search instead of calling get_unsent_messages. Any clues how to resolve that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33360 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- <Joubu> marcelr: 33360 - see misc/cronjobs/membership_expiry.pl:199 $upcoming_mem_expires = $upcoming_mem_expires->search( \$where_literal ) if @where; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31453 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=31453 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org