Skip to content

Commit 45c049d

Browse files
committed
cleanup
1 parent b34eead commit 45c049d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

php/sync/class-sync-queue.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Sync_Queue {
9090
*/
9191
public function __construct( \Cloudinary\Plugin $plugin ) {
9292
$this->plugin = $plugin;
93-
$this->cron_frequency = apply_filters( 'cloudinary_cron_frequency', 10 );
93+
$this->cron_frequency = apply_filters( 'cloudinary_cron_frequency', 10 * MINUTE_IN_SECONDS );
9494
$this->cron_start_offset = apply_filters( 'cloudinary_cron_start_offset', MINUTE_IN_SECONDS );
9595
$this->load_hooks();
9696
}
@@ -286,7 +286,7 @@ public function build_queue() {
286286
'post_status' => 'inherit',
287287
'posts_per_page' => 100,
288288
'fields' => 'ids',
289-
// phpcs:ignore
289+
// phpcs:ignore WordPress.DB.SlowDBQuery
290290
'meta_query' => array(
291291
'relation' => 'AND',
292292
array(
@@ -306,8 +306,6 @@ public function build_queue() {
306306
'no_found_rows' => true,
307307
);
308308

309-
$ids = array();
310-
311309
// translators: variable is page number.
312310
$action_message = sprintf( __( 'Building Queue.', 'cloudinary' ), $args['paged'] );
313311
do_action( '_cloudinary_queue_action', $action_message );
@@ -320,7 +318,7 @@ public function build_queue() {
320318

321319
return;
322320
}
323-
$ids = array_merge( $query->get_posts(), $ids );
321+
$ids = $query->get_posts();
324322

325323
$threads = $this->add_to_queue( $ids );
326324
$queue['total'] = array_sum( $threads );

0 commit comments

Comments
 (0)