Jake Vanderwerf
2026-01-20 7a9054bb3f033c98067b3196378311dae54c5fbf
inc/rest/routes/ContentRoutes.php
@@ -3,6 +3,8 @@
namespace JVBase\rest\routes;
use JVBase\JVB;
use JVBase\managers\queue\executors\ContentExecutor;
use JVBase\managers\queue\TypeConfig;
use JVBase\rest\RestRouteManager;
use JVBase\managers\CacheManager;
use JVBase\meta\MetaManager;
@@ -30,9 +32,6 @@
   protected array $timelineSharedFields = [];
   protected array $timelineUniqueFields = [];
   //TODO: Ensure we are handling the bulk operations for all processes
   //TODO: Also invalidate feed caches on updates!!
   public function __construct()
   {
      $this->cache_name = 'user_content_' . get_current_user_id();
@@ -40,7 +39,28 @@
      $this->cache->clear();
      $this->action = 'dash-';
      $this->operation_type = 'content_update';
      add_filter(BASE . 'handle_bulk_operation', [$this, 'processOperation'], 10, 3);
      add_action('init', [$this, 'registerContentExecutors'], 5);
   }
   /**
    * Register content operation types with the queue's TypeRegistry
    */
   public function registerContentExecutors(): void
   {
      $registry = JVB()->queue()->registry();
      $executor = new ContentExecutor();
      // Content updates - chunked at 10 posts
      $registry->register('content_update', new TypeConfig(
         executor: $executor,
         chunkKey: 'posts',
         chunkSize: 10
      ));
      // Batch creation (from uploads)
      $registry->register('batch_creation', new TypeConfig(
         executor: $executor
      ));
   }
   /**