From e9bdd12c845cfc87653adf25dbb41c397d432a1a Mon Sep 17 00:00:00 2001 From: Ramon Corrales Date: Wed, 27 May 2026 17:44:16 -0500 Subject: [PATCH] refactor: remove unused WPVDB\WPVDB bootstrap class Co-Authored-By: Claude Opus 4.7 (1M context) --- includes/class-wpvdb.php | 125 --------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 includes/class-wpvdb.php diff --git a/includes/class-wpvdb.php b/includes/class-wpvdb.php deleted file mode 100644 index a889a70..0000000 --- a/includes/class-wpvdb.php +++ /dev/null @@ -1,125 +0,0 @@ - 'wpvdb_process_embedding_batch', - 'status' => \ActionScheduler_Store::STATUS_PENDING, - 'per_page' => 1, - 'orderby' => 'date', - 'order' => 'ASC', - ) - ); - - if ( ! empty( $batch_actions ) ) { - $action = reset( $batch_actions ); - $action_id = $action->get_id(); - $args = $action->get_args(); - - // Remove this action from the queue to avoid duplicate processing. - as_unschedule_action( 'wpvdb_process_embedding_batch', $args, 'wpvdb' ); - - // Process the batch. - $batch_results = WPVDB_Queue::process_batch( $args[0] ); - $processed += count( array_filter( $batch_results ) ); - - // Continue processing more batches if needed. - if ( 0 === $limit || $processed < $limit ) { - WPVDB_Queue::maybe_process_next_batch(); - } - - return $processed; - } - - // If no batch actions, check for individual actions. - $batch_size = WPVDB_Queue::get_batch_size(); - if ( $limit > 0 && $batch_size > $limit ) { - $batch_size = $limit; - } - - $actions = as_get_scheduled_actions( - array( - 'hook' => 'wpvdb_process_embedding', - 'status' => \ActionScheduler_Store::STATUS_PENDING, - 'per_page' => $batch_size, - 'orderby' => 'date', - 'order' => 'ASC', - ) - ); - - if ( ! empty( $actions ) ) { - $batch_items = array(); - - foreach ( $actions as $action ) { - $action_id = $action->get_id(); - $args = $action->get_args(); - - // Add to our batch. - if ( ! empty( $args[0] ) ) { - $batch_items[] = $args[0]; - } - - // Remove this action from the queue to avoid duplicate processing. - as_unschedule_action( 'wpvdb_process_embedding', $args, 'wpvdb' ); - - // If we've reached our limit, stop. - if ( $limit > 0 && count( $batch_items ) >= $limit ) { - break; - } - } - - // Process the collected items as a batch. - if ( ! empty( $batch_items ) ) { - $batch_results = WPVDB_Queue::process_batch( $batch_items ); - $processed += count( array_filter( $batch_results ) ); - } - } - } - - return $processed; - } -}