Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] AddWorkerMetadata toWorker class.#42335
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
carsonbot commentedJul 31, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
c267c7c to25902aaComparecarsonbot commentedAug 1, 2021
Hey! I think@alexander-schranz has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
WorkerMetadata to worker lifecycle eventsalexander-schranz commentedAug 2, 2021
@carsonbot find another a reviewer please. |
carsonbot commentedAug 2, 2021
@tienvx could maybe review this PR? |
okwinza commentedAug 3, 2021
Friendly ping@Nyholm. |
Guikingone commentedAug 9, 2021 • 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.
Hi 👋🏻 I may ask a strange question but what's the benefits compared to using a As an event already receive the |
okwinza commentedAug 9, 2021
Hi, indeed, the whole PR might be replaced with one or a couple getters but:
|
chalasr commentedAug 9, 2021
I like the idea of using an object but I think it's fine to make it accessible from the Worker instead of passing it to all worker-aware events. |
WorkerMetadata to worker lifecycle eventsWorkerMetadata toWorker class.3c10761 toafeaf60Compareokwinza commentedAug 31, 2021
@chalasr I've refactored the PR according to your suggestions. Should be good to go once the CI is green. |
Uh oh!
There was an error while loading.Please reload this page.
53caaa0 to20b3222Compare20b3222 to9260aa6Compareokwinza commentedSep 13, 2021
lyrixx left a comment
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.
It looks cool.
But one question:
from where you gonna call$worker->getWorkerMetadata() ?
Uh oh!
There was an error while loading.Please reload this page.
okwinza commentedSep 22, 2021 • 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.
Much thanks for the review@lyrixx, appreciate it! |
Add tests for WorkerMetadata classFix WorkerMetadataTest headerAccess WorkerMetadata directly via getter and make it mutable.Fix CSRefactor WorkerMetadata::set() method to accept arrayUse null as default value for queueNames instead of falseAdd missing return typeMake fabbot happy
ff7520c to583f85bCompareokwinza commentedSep 22, 2021
Rebased, squashed & updated the PR description. Should be good to go now 🥳 . |
lyrixx commentedSep 22, 2021
Thanks for your work on this new feature! |
Uh oh!
There was an error while loading.Please reload this page.
At the moment, there is no clean way to access the values of
transportNamesor recently introducedqueueNamesthat the worker was configured with, although such data might be quite useful for logging/monitoring or other tasks.This PR attempts to fix that by adding a new and extensible way to provide additional information about a particular
Workerobject.So far, the following PRs could benefit from this change:
SIGTERMis received #42723Use case example:
async.idle.Before this PR, the only solution not relying on using Reflection API would look like this:
With this PR, one could simply use this to retrieve the transport name.
So the whole solution would look like this: