Skip to content

Commit

Permalink
fixes #55 adjusts order for failed task query
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeProKid committed Sep 25, 2018
1 parent 44369fd commit 7677329
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,23 @@ public function delete_failed( $args, $assoc_args ) {

}

/**
* Retrieve the failed tasks within a given queue
*
* @param string $queue Name of the queue to retrieve failed tasks for
*
* @return \WP_Query
* @access private
*/
private function get_failed_tasks( $queue ) {

$args = [
'post_type' => self::POST_TYPE,
'posts_per_page' => 999,
'fields' => 'ids',
'no_found_rows' => true,
'order' => 'ASC',
'orderby' => 'date',
'tax_query' => [
[
'taxonomy' => self::TAXONOMY,
Expand All @@ -415,8 +425,7 @@ private function get_failed_tasks( $queue ) {
],
];

$tasks = new \WP_Query( $args );
return $tasks;
return new \WP_Query( $args );

}

Expand Down

0 comments on commit 7677329

Please sign in to comment.