File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -399,24 +399,33 @@ public function delete_failed( $args, $assoc_args ) {
399399
400400 }
401401
402+ /**
403+ * Retrieve the failed tasks within a given queue
404+ *
405+ * @param string $queue Name of the queue to retrieve failed tasks for
406+ *
407+ * @return \WP_Query
408+ * @access private
409+ */
402410 private function get_failed_tasks ( $ queue ) {
403411
404412 $ args = [
405- 'post_type ' => self ::POST_TYPE ,
413+ 'post_type ' => self ::POST_TYPE ,
406414 'posts_per_page ' => 999 ,
407- 'fields ' => 'ids ' ,
408- 'no_found_rows ' => true ,
409- 'tax_query ' => [
415+ 'fields ' => 'ids ' ,
416+ 'no_found_rows ' => true ,
417+ 'order ' => 'ASC ' ,
418+ 'orderby ' => 'date ' ,
419+ 'tax_query ' => [
410420 [
411421 'taxonomy ' => self ::TAXONOMY ,
412- 'field ' => 'slug ' ,
413- 'terms ' => $ queue ,
422+ 'field ' => 'slug ' ,
423+ 'terms ' => $ queue ,
414424 ],
415425 ],
416426 ];
417427
418- $ tasks = new \WP_Query ( $ args );
419- return $ tasks ;
428+ return new \WP_Query ( $ args );
420429
421430 }
422431
You can’t perform that action at this time.
0 commit comments