Skip to content

Commit 06ce2d2

Browse files
committed
Fix VIPCS warnings
1 parent aab4e62 commit 06ce2d2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

includes/Classifai/Command/ClassifaiCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ private function get_posts_to_classify( $opts = array() ) {
12801280
'post_type' => ! empty( $opts['post_type'] ) ? $opts['post_type'] : 'any',
12811281
'post_status' => 'publish',
12821282
'fields' => 'ids',
1283-
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page
1283+
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page, WordPressVIPMinimum.Performance.NoPaging.posts_per_page_posts_per_page
12841284
);
12851285

12861286
\WP_CLI::log( 'Fetching posts to classify ...' );

includes/Classifai/Providers/Localhost/OllamaEmbeddings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function regenerate_embeddings() {
385385
$embedding_posts = get_posts(
386386
array(
387387
'post_type' => 'any',
388-
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page
388+
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page, WordPressVIPMinimum.Performance.NoPaging.posts_per_page_posts_per_page
389389
'fields' => 'ids',
390390
'meta_key' => 'classifai_ollama_embeddings', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
391391
'meta_compare' => 'EXISTS',

includes/Classifai/Providers/OpenAI/Embeddings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public function regenerate_embeddings() {
491491
$embedding_posts = get_posts(
492492
array(
493493
'post_type' => 'any',
494-
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page
494+
'posts_per_page' => -1, // phpcs:ignore WordPress.WP.PostsPerPageNoUnlimited.posts_per_page_posts_per_page, WordPressVIPMinimum.Performance.NoPaging.posts_per_page_posts_per_page
495495
'fields' => 'ids',
496496
'meta_key' => 'classifai_openai_embeddings', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
497497
'meta_compare' => 'EXISTS',

0 commit comments

Comments
 (0)