File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments