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

[6.x] Add events to signal when scheduled task runs #29888

Merged
merged 6 commits into from Sep 13, 2019

Conversation

@michaeldyrynda
Copy link
Contributor

commented Sep 6, 2019

We already have the Illuminate\Console\Events\CommandStarting and Illuminate\Console\Events\CommandFinished events, but these are fired for any command that is run, be it via the CLI directly, or via schedule:run.

Having the scheduled-task specific events makes it much easier to identify when a scheduled task runs, allowing better monitoring of these tasks in a more dynamic manner.

@taylorotwell

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

On single server events it seems to fire even when the event is never actually run on the given server.

@michaeldyrynda

This comment has been minimized.

Copy link
Contributor Author

commented Sep 6, 2019

Right you are. I’ll update this PR to get the events to dispatch only within the runEvent method.

@michaeldyrynda

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

Should be good for another look @taylorotwell

@driesvints

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

@michaeldyrynda definitely not a requirement but any chance you can use rebase instead of merging in the 6.x branch into your PR? Keeps the commit history nice and clean.

…all events
@michaeldyrynda

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

Did the rebase @driesvints 😘

@taylorotwell taylorotwell merged commit 07cf996 into laravel:6.x Sep 13, 2019
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@simonschaufi

This comment has been minimized.

Copy link

commented Sep 26, 2019

Out of curiosity, shouldn't the new tag be 6.1 for new features?

MINOR version when you add functionality in a backwards compatible manner

@GrahamCampbell

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

Yeh, it should have been.

@michaeldyrynda

This comment has been minimized.

Copy link
Contributor Author

commented Sep 26, 2019

The rest of that line says “... to the public API.”

It’s not clear to me if adding events is part of the public API, though. For the record, I was expecting a minor bump with this change, but it’s a gray area imo.

The other stuff that went into this release added test helper methods and I feel that those aren’t public API of the framework, either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.