Browse Source

Wrap check in else

pull/15/head
Chris MacDonald 11 months ago
parent
commit
c604f8aa96
  1. 8
      src/Plugin/QueueWorker/FixityCheckWorker.php

8
src/Plugin/QueueWorker/FixityCheckWorker.php

@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @QueueWorker( * @QueueWorker(
* id = "dgi_fixity.fixity_check", * id = "dgi_fixity.fixity_check",
* title = @Translation("Fixity Checks"), * title = @Translation("Fixity Checks"),
* cron = {"time" = 15} * cron = {"time" = 1}
* ) * )
*/ */
class FixityCheckWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface { class FixityCheckWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface {
@ -62,10 +62,10 @@ class FixityCheckWorker extends QueueWorkerBase implements ContainerFactoryPlugi
if ($data instanceof FixityCheckInterface) { if ($data instanceof FixityCheckInterface) {
if (empty($data->getFile())) { if (empty($data->getFile())) {
$data->delete(); $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());
} }
} }

Loading…
Cancel
Save