From c604f8aa96f46b4dac12b17c0162e7d00791a539 Mon Sep 17 00:00:00 2001 From: Chris MacDonald <31731869+chrismacdonaldw@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:07:37 -0400 Subject: [PATCH] Wrap check in else --- src/Plugin/QueueWorker/FixityCheckWorker.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Plugin/QueueWorker/FixityCheckWorker.php b/src/Plugin/QueueWorker/FixityCheckWorker.php index b0a7106..48e9e11 100644 --- a/src/Plugin/QueueWorker/FixityCheckWorker.php +++ b/src/Plugin/QueueWorker/FixityCheckWorker.php @@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * @QueueWorker( * id = "dgi_fixity.fixity_check", * title = @Translation("Fixity Checks"), - * cron = {"time" = 15} + * cron = {"time" = 1} * ) */ class FixityCheckWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface { @@ -62,10 +62,10 @@ class FixityCheckWorker extends QueueWorkerBase implements ContainerFactoryPlugi if ($data instanceof FixityCheckInterface) { if (empty($data->getFile())) { $data->delete(); - return; + } else { + /** @var \Drupal\dgi_fixity\FixityCheckInterface $data */ + $this->fixity->check($data->getFile()); } - /** @var \Drupal\dgi_fixity\FixityCheckInterface $data */ - $this->fixity->check($data->getFile()); } }