Add option for cron processing of queue

Created on 5 December 2019, over 4 years ago
Updated 22 May 2024, about 1 month ago

There should be a UI option to enable/disable cron processing of the bulletin queue.
An optional setting to adjust the time interval would be a nice feature too.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

    I agree a UI option to enable/disable cron processing of the queue would be ideal. But as a workaround, here's some code I've added to a custom module to make the cron process the queue:

    /**
     * Implement hook_cron()
     */
    function MYMODULE_cron()
    {
      $queue_worker = \Drupal::service('plugin.manager.queue_worker');
      $bulletinQueue_worker = $queue_worker->createInstance('govdelivery_bulletins');
      $bulletinQueue_worker->processQueue();
    }
    

    (Replace MYMODULE with the name of your custom module.)

Production build 0.69.0 2024