Loading src/QueueWorker.php +9 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ use Drupal\Core\Queue\QueueFactory; use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Queue\RequeueException; use Drupal\Core\Queue\SuspendQueueException; use Drupal\Core\Queue\DelayableQueueInterface; use Drupal\Core\Queue\DelayedRequeueException; /** * Defines the queue worker. Loading Loading @@ -114,6 +116,13 @@ class QueueWorker { // The worker requested the task be immediately requeued. $queue->releaseItem($item); } catch (DelayedRequeueException $e) { if ($queue instanceof DelayableQueueInterface) { // This queue can handle a custom delay; use the duration provided // by the exception. $queue->delayItem($item, $e->getDelay()); } } catch (SuspendQueueException $e) { // If the worker indicates there is a problem with the whole queue, // release the item and skip to the next queue. Loading Loading
src/QueueWorker.php +9 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ use Drupal\Core\Queue\QueueFactory; use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Queue\RequeueException; use Drupal\Core\Queue\SuspendQueueException; use Drupal\Core\Queue\DelayableQueueInterface; use Drupal\Core\Queue\DelayedRequeueException; /** * Defines the queue worker. Loading Loading @@ -114,6 +116,13 @@ class QueueWorker { // The worker requested the task be immediately requeued. $queue->releaseItem($item); } catch (DelayedRequeueException $e) { if ($queue instanceof DelayableQueueInterface) { // This queue can handle a custom delay; use the duration provided // by the exception. $queue->delayItem($item, $e->getDelay()); } } catch (SuspendQueueException $e) { // If the worker indicates there is a problem with the whole queue, // release the item and skip to the next queue. Loading