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

Maxretry handler with {} queue option Argument should return false #22

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

anuonifade
Copy link
Contributor

When opts[:queue_options][:arguments] have an empty hash {}, it should return false.

Copy link
Contributor

@texpert texpert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting some small performance optimizations

lib/sneakers/handlers/maxretry.rb Outdated Show resolved Hide resolved
lib/sneakers/handlers/maxretry.rb Outdated Show resolved Hide resolved
lib/sneakers/handlers/maxretry.rb Outdated Show resolved Hide resolved
michaelklishin and others added 3 commits November 8, 2024 10:10
Co-authored-by: Aurel Branzeanu <branzeanu.aurel@gmail.com>
Co-authored-by: Aurel Branzeanu <branzeanu.aurel@gmail.com>
Co-authored-by: Aurel Branzeanu <branzeanu.aurel@gmail.com>
@michaelklishin
Copy link
Member

Apparently in order to use #dig we must forward it to the underlying hash. @anuonifade feel free to either revert our suggested commits or add a forward (if I understood the "no method found" exception correctly).

@texpert
Copy link
Contributor

texpert commented Nov 8, 2024

Apparently in order to use #dig we must forward it to the underlying hash. @anuonifade feel free to either revert our suggested commits or add a forward (if I understood the "no method found" exception correctly).

Yes, :dig should be added to def_delegators in Sneakers::Configuration. Here - https://github.com/ruby-amqp/kicks/blob/main/lib/sneakers/configuration.rb#L8

@michaelklishin michaelklishin merged commit 2e294fb into ruby-amqp:main Nov 8, 2024
0 of 4 checks passed
@michaelklishin michaelklishin added this to the 3.1.2 milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants