action-scheduler
action-scheduler copied to clipboard
Feature: adding the --ignore-group CLI option
This PR fixes https://github.com/woocommerce/action-scheduler/issues/736.
As suggested in the issue, a --ignore-group
option is the desired approach to name this.
The PR also adds support for multiple comma-separated groups, so --ignore-group=group1,group2
could be used as well. This implementation would also allow for the --group
option to take comma-separated values as --group=group1,group2
.
Why this approach?
Looking at the $runner->setup( $batch, $hooks, $group, $force, $ignore_group );
alternative, where we would have to pass the $ignore_group
additional parameter, the $group
and $ignore_group
are very similar, so maybe using a flag to specify which group to ignore as proposed in this PR might make the code a little bit simpler?
Tests - TBD
Happy to add any related tests if this approach is considered valid.