action-scheduler icon indicating copy to clipboard operation
action-scheduler copied to clipboard

Feature: adding the --ignore-group CLI option

Open ovidiul opened this issue 3 years ago • 0 comments

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.

ovidiul avatar Oct 27 '21 10:10 ovidiul