Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Scheduler] Add MessageHandler result to thePostRunEvent
#58546
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
slutsky commentedOct 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
How does it work if the handler result type is "never"? I think It's better to use a message to transfer result. Possible to use a setter to add a result to the message inside a handler. |
If the MessageHandler does never return the $result value will be null. If the messagehandler is not in your own control(for instance RunCommandMessageHandler) it is not possible to use a setter to set the result to the message from the handler. The HandledStamp already collects the result of the message handler. This change will only allow you to use this result in the scheduler component as well. |
1705445
to4e56ad4
Compare@kbond Could you take a look at this maybe? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this makes sense.@alli83, have any thoughts?
03dceb0
to468c02d
Comparebartholdbos commentedOct 25, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the reply. I have also changed the |
468c02d
to959b270
Comparealli83 commentedOct 29, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Retrieving the result could indeed be interesting e.g depending on the outcome, we might decide whether to continue or stop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm good with this feature. Can you add an entry to the changelog?
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
7.2 is in feature freeze so this will likely not make it until 7.3.
268e589
to05fe4a3
Compare@kbond I have rebased the branch on 7.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good!
@bartholdbos, would you like to try updating the test? I was thinkinghere, instead of setting the props to true, set them to the event object and then assert on them in the test. If not, no worries, I can add after merge.
@kbond Sure, I have updated the test to use the event object instead of the booleans. It can now assert on properties that are in the event, is this what you meant? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, that looks great!
src/Symfony/Component/Scheduler/Tests/EventListener/DispatchSchedulerEventListenerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Scheduler/Tests/EventListener/DispatchSchedulerEventListenerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Scheduler/Tests/EventListener/DispatchSchedulerEventListenerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the review@kbond! I think it's ready on my side, is another review required or is it ready for merging by you/somebody else? |
Just need to wait for another core team member approval. |
@fabpot Could you maybe take a look at this? |
PostRunEvent
@bartholdbos, since this has been approved, it'll likely get approved by another core member and merged closer to the 7.3 feature freeze. |
3e9c00b
to306eeb6
CompareThank you@bartholdbos. |
201747b
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR will add the result of a MessageHandler to the PostRunEvent of the Scheduler Component. This can be used for example for retrieving the output of a RunCommandMessage scheduled by the scheduler component.