Skip to content
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

Closed
aleho opened this issue Jan 19, 2021 · 3 comments
Closed

Add retry counter to queue #35

aleho opened this issue Jan 19, 2021 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@aleho
Copy link
Contributor

aleho commented Jan 19, 2021

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?

@mmenozzi
Copy link
Member

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?

@aleho
Copy link
Contributor Author

aleho commented Jan 22, 2021

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.

@LucaGallinari LucaGallinari added this to the v2.0.0 milestone Mar 14, 2022
@LucaGallinari LucaGallinari added the enhancement New feature or request label Mar 14, 2022
@lruozzi9
Copy link
Member

With the v2.0 we have introduced Messenger to handle the QueueItem to import, so the scope of the issue should be completed.

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.

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.

@aleho aleho closed this as completed Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants