- Issue created by @cafuego
- π¦πΊAustralia cafuego
I have a patch for a work-around, but I'm not sure if this isn't a bad idea :-)
class AmazonSesMailQueue extends QueueWorkerBase implements ContainerFactoryPluginInterface { use HandlerTrait; /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { $instance = new static( $configuration, $plugin_id, $plugin_definition ); // Only set the handler if queueing is enabled to avoid an error when // trying to run without config. $enabled = \Drupal::config('amazon_ses.settings')->get('queue'); if ($enabled) { $instance->setHandler($container->get('amazon_ses.handler')); } return $instance; }
- Merge request !14#3417090: Do not try to create a queue instance when not configured for queueing. β (Open) created by cafuego
- last update
9 months ago CI error - Status changed to Needs review
5 months ago 1:43am 20 June 2024 - last update
5 months ago 16 pass - First commit to issue fork.
- πΊπΈUnited States davisben NH
davisben β changed the visibility of the branch 3417090 to hidden.
- πΊπΈUnited States davisben NH
I took a different approach by implementing hook_queue_info_alter() to remove the mail queue from cron when it's not enabled. Could you give this a test and see if it works as you expect it to?