Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/managers/queue/executors/IntegrationExecutor.php
@@ -3,6 +3,8 @@
use JVBase\managers\queue\{Executor, Operation, Progress, Result};
use Exception;
use JVBase\integrations\ServiceMap;
use JVBase\managers\Errors;
if (!defined('ABSPATH')) {
   exit;
@@ -18,7 +20,7 @@
 *          {integration}_sync_from, {integration}_sync_customer, etc.
 *
 * Registration (in Integrations::registerAdditionalHooks):
 *   $queue = JVB()->queue();
 *   $queue = Queue::getInstance();
 *   $queue->registry()->register('helcim_sync_to', new TypeConfig(
 *       executor: new IntegrationExecutor(),
 *       chunkKey: 'items',
@@ -28,11 +30,8 @@
 */
final class IntegrationExecutor implements Executor
{
   /**
    * Map of integration service names to class identifiers.
    * Populated on first use from JVB()->connect().
    */
   private array $integrationCache = [];
   use ServiceMap;
   public function execute(Operation $operation, Progress $progress): Result
   {
@@ -60,7 +59,7 @@
         };
      } catch (Exception $e) {
         JVB()->error()->log(
         Errors::getInstance()->log(
            '[IntegrationExecutor]:execute',
            $e->getMessage(),
            [
@@ -105,7 +104,7 @@
      if ($userId === 0) {
         $userId = null;
      }
      return JVB()->connect($serviceName, $userId);
      return $this->getServiceUser($serviceName, $userId);
   }
   /*****************************************************************