-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add retry counter to queue #35
Comments
I think that if we need this kind of logic maybe it's better to refactor the plugin to fully use/support Symfony's Messenger component for the whole queue handling. @fabianaromagnoli @LucaGallinari @lruozzi9 what do you think? |
Because I really love the messenger and also it's implementation: Absolutely! You should still keep the queue though and mark entries done in message handlers because there's no good way of checking for "item done" in messenger, especially once you start using an external queue system like RabbitMQ. |
With the v2.0 we have introduced Messenger to handle the QueueItem to import, so the scope of the issue should be completed.
Obviously, without storing the imported items in the queue we can't display the status of the imports, but keeping the current queue only for this scope smell. I am thinking to add something like a new entity that will contain the identifier of the product and some other info like the Akeneo attributes used to populate the product. Another solution could be simply adding a column importedAt on the ProductVariant with the timestamp of the last import from Akeneo. Anyway, this will be done in another issue. |
On busy sites a failure might actually be retryable (deadlocks come to mind) and could already work a few seconds later.
The current implementation will try forever (even for items that are likely to never succeed), which on the other hand makes sense considering that the enqueue command with since-file cannot check for "changed after date X or not yet imported".
In my opinion a retry stategy (something like Symfony's
RetryStrategyInterface
) might still come in handy.What do you think?
The text was updated successfully, but these errors were encountered: