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

ArgumentError in slow_queries #489

Closed
rcovar00 opened this issue Feb 20, 2024 · 1 comment
Closed

ArgumentError in slow_queries #489

rcovar00 opened this issue Feb 20, 2024 · 1 comment

Comments

@rcovar00
Copy link

When attempting to use the PgHero.slow_queries method in an environment with Ruby 3.0.6, an ArgumentError occurs.

Steps to Reproduce:

  1. Upgrade to Ruby 3.0.6
  2. Run PgHero.slow_queries.
  3. Observe the mentioned ArgumentError.

Environment Information:

  • Ruby version: 3.0.6
  • PgHero version: 3.4.1

Error Message and Stack Trace:

ArgumentError:  wrong number of arguments (given 1, expected 0)
/gems/pghero-3.4.0/lib/pghero/methods/query_stats.rb:4 in query_stats
/gems/pghero-3.4.0/lib/pghero/methods/query_stats.rb:171 in slow_queries
vendor/ruby-3.0.6/lib/ruby/3.0.0/forwardable.rb:238 in slow_queries
236:    end;
237:  end
238:end
239:
240:# SingleForwardable can be used to setup delegation at the object level as well.

lib/tasks/pg_hero.rake:22 in diagnose_queries
20: def diagnose_queries
21: # Check for slow queries
22: slow_queries_to_notify = PgHero.slow_queries
@ankane ankane closed this as completed in 488972a Feb 20, 2024
@ankane
Copy link
Owner

ankane commented Feb 20, 2024

Hi @rcovar00, thanks for reporting! Fixed in the commit above.

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

No branches or pull requests

2 participants