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

Basket not cleared when "overflowing"/"overfull" #84

Open
alecclarke opened this issue May 29, 2023 · 0 comments
Open

Basket not cleared when "overflowing"/"overfull" #84

alecclarke opened this issue May 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@alecclarke
Copy link
Collaborator

Describe the bug
In some cases the basket might end up with more entries than the queue_class.basket_options_hash[:size] which prevents the basket from ever performing/or being cleared.

These scenarios could happen when a certain record is added to the queue_collection but the on_success or perform raises an exception prior to the basket being cleared — and a subsequent Basket.add pushes the basket capacity passed the defined size.

To Reproduce
Steps to reproduce the behavior:

  1. Explicitly raise an error in the perform action
  2. Add items into the basket
  3. When the basket performs, and throws an error the items aren't cleared
  4. Add additional items to the basket will never trigger "perform"

Expected behavior
Ideally the basket can be cleared at some point if the contents "overflow" 😄

@alecclarke alecclarke added the bug Something isn't working label May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant