action-scheduler
action-scheduler copied to clipboard
Option to ignore some groups when using the wp-cli command
Hello,
It would be nice to have an option to ignore some groups when using the wp-cli command.
For example:
- run actions from
cachegroup:wp action-scheduler run --group=cache - run actions from all groups, except
cache:wp action-scheduler run --group=-cacheor maybewp action-scheduler run --ignore-group=cache
What do you think?
I definitely see the utility of that—thanks for the suggestion.
- I'm tending to think a new flag like
--ignore-groupmight be best (vs using a new-group_namesyntax with the existing--groupflag), but what are your own thoughts on that? - Do you see a need to support passing multiple group names, and do you have any preference as to how that would look (such as
--ignore-group=foo,bar,bazor something else)? - If we agree on how this should look and behave, are you also interested in crafting a PR for this (or would you rather leave that to the team)?
Hello,
I'm tending to think a new flag like --ignore-group might be best (vs using a new -group_name syntax with the existing --group flag), but what are your own thoughts on that?
I like both options, but a new flag (like --ignore-group) would be much more intuitive.
Do you see a need to support passing multiple group names, and do you have any preference as to how that would look (such as --ignore-group=foo,bar,baz or something else)?
Yes, I think --ignore-group=foo,bar,baz would be great.
If we agree on how this should look and behave, are you also interested in crafting a PR for this (or would you rather leave that to the team)?
I would rather leave it to the team, but I might give it a try in a month or two if the team is too busy. :)
Great, thanks @georgejipa.