For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code.
Created attachment 167655 [details] [review] Bug 37075: Message queue processor will fail to send any message unless letter_code is passed For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code. Test Plan: 1) Generate some messages in the message queue 2) Run `process_message_queue.pl -v -c` 3) Note nothing happens 4) Apply this patch 5) Repeat step 2 6) Messages are sent!
Created attachment 167704 [details] [review] Bug 37075: Message queue processor will fail to send any message unless letter_code is passed For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code. Test Plan: 1) Generate some messages in the message queue 2) Run `process_message_queue.pl -v -c` 3) Note nothing happens 4) Apply this patch 5) Repeat step 2 6) Messages are sent! Signed-off-by: David Nind <david@davidnind.com>
Created attachment 167710 [details] [review] Bug 37075: Message queue processor will fail to send any message unless letter_code is passed For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code. Test Plan: 1) Generate some messages in the message queue 2) Run `process_message_queue.pl -v -c` 3) Note nothing happens 4) Apply this patch 5) Repeat step 2 6) Messages are sent! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Weird, but documented behaviour for GetOptions. Passing QA
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.06