Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/managers/queue/Queue.php
@@ -4,8 +4,12 @@
   exit;
}
use Exception;
use JVBase\Instance;
use JVBase\managers\AdminPages;
use JVBase\managers\Errors;
use JVBase\rest\routes\QueueRoutes;
use Throwable;
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;
@@ -102,8 +106,8 @@
            'updated_existing' => false,
         ];
      } catch (\Exception $e) {
         JVB()->error()->log('queue', $e->getMessage(), $data, 'high');
      } catch (Exception $e) {
         Errors::getInstance()->log('queue', $e->getMessage(), $data, 'high');
         return new WP_Error('queue_failed', $e->getMessage());
      }
   }
@@ -111,7 +115,7 @@
   /**
    * Try to merge incoming operation into an existing pending/scheduled one.
    * Returns result array if merged, null if not.
    * @throws \Throwable
    * @throws Throwable
    */
   private function tryMerge(Operation $incoming): ?array
   {
@@ -180,7 +184,7 @@
   public function maintenance(): void
   {
      $this->locker->withLock(function () {
         $this->storage->resetStuckOperations(30);
         $this->storage->resetStuckOperations();
      });
      $this->runQueueOnShutdown();
   }
@@ -203,7 +207,7 @@
   /**
    * Get a specific value from an operation - backwards compatibility
    */
   public function getOperationValue(string $id, string $column, bool $decodeJson = true): mixed
   public function getOperationValue(string $id, string $column, bool $decodeJson = true): \static|string|int|array|null
   {
      $op = $this->get($id);
      if (!$op) {