socialpandas / sidekiq_monitor

Advanced monitoring for Sidekiq
MIT License
230 stars 35 forks source link

undefined method `has_key?' for 10:Fixnum #36

Open vanso-waqar opened 9 years ago

vanso-waqar commented 9 years ago

Hi, I am getting undefined method `has_key?' for 10:Fixnum error on '/sidekiq/queues' page. When I traced the api/controllers/queues_controller.rb I found an issue with this line

status_counts = Sidekiq::Monitor::Job.where(queue: queue).count(group: 'status')

It works if I change it to

status_counts = Sidekiq::Monitor::Job.where(queue: queue).group_by(&:status)

Please suggest a work around for this.

losadaem commented 9 years ago

I've submitted a pull request that resolves this issue: #37

shwanton commented 9 years ago

seeing this issue as well w/ Rails 4.2.1