Add a Drush Command to Process All Queues

Created on 28 January 2025, 7 months ago

Creat a new Drush command that processes all Advanced Queue queues. This command ensures that developers can easily handle multiple queues without manually invoking them one by one.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Qusai Taha Amman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Qusai Taha
  • πŸ‡―πŸ‡΄Jordan Qusai Taha Amman
  • Status changed to Needs work 2 days ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
    1. +++ b/src/Commands/AdvancedQueueCommands.php
      @@ -95,6 +95,57 @@ class AdvancedQueueCommands extends DrushCommands {
      +   * @option timeout The maximum execution time for each queue. Defaults to 90 seconds.
      

      Do we need to be smarter here. If we have a max execution time setting in PHP it feels like we need to stop the script before it overshoots it. I think this is more problematic than the single queue processor...

    2. +++ b/src/Commands/AdvancedQueueCommands.php
      @@ -95,6 +95,57 @@ class AdvancedQueueCommands extends DrushCommands {
      +      if (extension_loaded('pcntl')) {
      +        pcntl_async_signals(TRUE);
      +
      +        pcntl_signal(SIGTERM, function () {
      +          $this->processor->stop();
      +        });
      +
      +        pcntl_signal(SIGINT, function () {
      +          $this->processor->stop();
      +        });
      +      }
      

      This doesn't need to be done in the loop.

    Can we convert this to an MR? Thanks!

Production build 0.71.5 2024