Skip to content
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

Avoid overriding of Event::$omitErrors value while running commands #63

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

lexeo
Copy link

@lexeo lexeo commented May 17, 2020

Hiy guys.
First of all, thank you for the extension.

I tried to use the ext in my application but found out that any Event::$omitErrors value set in a config is overridden in the controller while running. Thus, it does not matter which value we set configuring the schedule before, it will be overridden.

The default value of Event::$omitErrors is false, so we don't need to overwrite it in the controller.
I understand that sometimes it could be useful to globally force omitting (or not) errors. In this case I agree, we can use a controller property, but mb give it more obvious name (forceOmitErrors, globalOmitErrors, etc.)?)

My changes in general don't break BC and only allow us to configure omitErrors param for each command (Event) independently in a config.

lexeo added 30 commits May 17, 2020 20:07
 Optimize AbstractEvent::filtersPass() checking rejects first
 Refactor an event dispatching and running of callbacks
 Set lock only before running command (not during configuration)
 Do not return CallbackEvent result but set into the property
 Finish only one matching scheduled job per callback run
 Output message if no jobs ran
 Finish only ShellJobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant