-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[Scheduler] Separate id and description in message providers #52874
[Scheduler] Separate id and description in message providers #52874
Conversation
Hey! Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "6.4". Cheers! Carsonbot |
188c9ea
to
d5f9d45
Compare
Not sure what to do with the tests since |
src/Symfony/Component/Scheduler/Messenger/ServiceCallMessage.php
Outdated
Show resolved
Hide resolved
d5f9d45
to
52423ea
Compare
While you're addressing this, could you check other |
@alex-dev but Or yeah if you don't implement |
You don't define uniqueness only by |
687a3d6
to
bd6144e
Compare
Ok then, I separated id & description and used hashed serialized message for uniqueness with I would've rather added explicit What do you think? We could also consider adding |
ServiceCallMessage
arguments in scheduler
Seems good! |
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.
LGTM with a minor comment
e57d177
to
d73bf83
Compare
Thank you @valtzu. |
|
||
return new self($trigger, new StaticMessageProvider([$message], $description)); | ||
return new self($trigger, new StaticMessageProvider([$message], strtr(substr(base64_encode(hash('xxh128', serialize($message), true)), 0, 7), '/+', '._'), -7), $description)); |
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.
FYI, there was a syntax error on this line. I fixed that in a45f6cb. Please double-check that I didn't mess anything with the logic implemented here.
Separate id and description in message providers to keep
debug:schedule
output clean while allowing arbitrary distinct id.