-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WP-CLI #1071
base: trunk
Are you sure you want to change the base?
WP-CLI #1071
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I posted some initial thoughts as I work my way through the PR, let me know what you think.
classes/WP_CLI/Action/Cancel.php
Outdated
try { | ||
call_user_func( $function_name, $hook, $callback_args, $group ); | ||
} catch ( \Exception $e ) { | ||
$this->print_error( $e, $multiple ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that it won't throw an exception necessarily even if cancelling failed, there could be an error caught by the try_catch in as_unschedule_action
. It would be more reliable to either
- check the logs for failed action, or
- verify that the action is indeed cancelled, or
- modify the
as_unschedule_action
to return the result value so that we can display it reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to rework this command a bit: realized in its current state actions could not be unscheduled by group only.
The code looks good, going to test around these flows in general:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posting feedback for some initial testing I was able to get around to today. Seems like we need to sprinkle in some more defensive checks
@barryhughes Stalled again. 😞 |
Yep, I'm sorry. We've been focusing on other tasks and responsibilities that have taken priority. This is looking great, though, so bear with us a little longer. Probably, if any further changes are needed, they'll be minor/small pieces of clean-up, and so we can likely take care of those if required (and can similarly update the branch if it falls out of sync in the meantime). |
Port of crstauf/action-scheduler-cli into Action Scheduler.
Closes #255.
Hope I'm not disappointed.