symfony / symfony-docs

The Symfony documentation
https://symfony.com/doc
Other
2.15k stars 5.1k forks source link

[Messenger] use a custom batch size #20054

Closed xabbuh closed 1 month ago

xabbuh commented 1 month ago

reverts #19953 so that the code matches the comment above the method

xabbuh commented 1 month ago

But I wonder if we shouldn't simply not show this way to change the batch size but simply keep the overridden getBatchSize() method to showcase this use case?

javiereguiluz commented 1 month ago

Thanks Christian. I agree with you: this example looks bad because we're overriding the shouldFlush() method to do something that it's easier and makes more sense when overriding the getBatchSize() method.

So, I removed this while merging: https://github.com/symfony/symfony-docs/commit/a51bc508aa3c34cef799222119e1a29f76696cfd