Skip to content

Commit

Permalink
fix: empty processed status and error on empty
Browse files Browse the repository at this point in the history
pr feedback adds better output when no requests are processed
  • Loading branch information
jaredrethman committed Feb 22, 2024
1 parent efa1709 commit f215367
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/node/class-webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ public function cli_process( array $args, array $assoc_args ): void {
$progress->finish();

if ( ! empty( $unprocessed_request_ids ) ) {
WP_CLI::warning( "The following requests could not be deleted:\n" . wp_json_encode( $unprocessed_request_ids ) );
WP_CLI::error( "The following requests could not be processed:\n" . wp_json_encode( $unprocessed_request_ids ) );
return;
}
WP_CLI::success( "Successfully processed {$processed_count}/{$requests_count} pending requests." );
WP_CLI::success( "Successfully processed {$processed_count}/{$requests_count} '{$status}' requests." );
}
}

0 comments on commit f215367

Please sign in to comment.