Jake Vanderwerf
2026-02-10 f9c8317a067139d4b75a94933c156f785780d33b
inc/managers/queue/Queue.php
@@ -11,6 +11,7 @@
   private Storage $storage;
   private Processor $processor;
   private TypeRegistry $registry;
   public Executor $executor;
   private Locker $locker;
   public function __construct()
@@ -19,8 +20,8 @@
      $this->registry = new TypeRegistry();
      $this->locker = new Locker();
      $executor = new FilteredExecutor($this->storage);
      $this->processor = new Processor($this->storage, $executor, $this->registry);
      $this->executor = new FilteredExecutor();
      $this->processor = new Processor($this->storage, $this->executor, $this->registry);
      add_action('jvb_process_queue', [$this, 'checkQueue']);
      add_action('jvb_queue_maintenance', [$this, 'maintenance']);
@@ -100,16 +101,11 @@
   public function maintenance(): void
   {
      $this->locker->withLock(function () {
         $this->cleanupStuck();
         $this->storage->resetStuckOperations(30);
      });
   }
   private function cleanupStuck(): void
   {
      $this->storage->resetStuckOperations(30);
   }
   // === Public Getters ===
   public function get(string $id): ?Operation