* cron = {"time" = 60}
* )
*/
-class WootRequeueException extends QueueWorkerBase {
+class WootRequeueException extends QueueWorkerBase
+{
/**
* {@inheritdoc}
*/
- public function processItem($data) {
- $state = \Drupal::state();
- if (!$state->get('woot_requeue_exception')) {
- $state->set('woot_requeue_exception', 1);
- throw new RequeueException('I am not done yet!');
+ public function processItem($data)
+ {
+ $state = \Drupal::state();
+ if (!$state->get('woot_requeue_exception')) {
+ $state->set('woot_requeue_exception', 1);
+ throw new RequeueException('I am not done yet!');
+ } else {
+ $state->set('woot_requeue_exception', 2);
+ }
}
- else {
- $state->set('woot_requeue_exception', 2);
- }
- }
-
}