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

fix queues value #155

Merged
merged 2 commits into from
Jan 22, 2023
Merged

Conversation

nisyuu
Copy link
Contributor

@nisyuu nisyuu commented Jan 17, 2023

Fixes #153.

The undefined method to_sym is occurred when queues have array in a sidekiq.yml. If queues have queue name and weighting, config[:queues] also get queue name and weighting. I think that config[:queues] have only queue name. Therefore , I tried to get only the queue name if config[:queues] have weighting besides queue name.

@javinto
Copy link

javinto commented Jan 18, 2023

I tried your fix. Starting Sidekiq now works as expected, but exiting Sidekiq leads to the following exception

/Users/me/.rvm/gems/ruby-3.1.2@project/gems/sidekiq-7.0.3/lib/sidekiq/fetch.rb:31:in initialize': undefined method queues' for Sidekiq:Module (NoMethodError)

  raise ArgumentError, "missing queue list" unless cap.queues
                                                      ^^^^^^^
from /Users/me/.rvm/gems/ruby-3.1.2@project/bundler/gems/sidekiq-limit_fetch-97084a6352bd/lib/sidekiq/limit_fetch.rb:56:in `new'
from /Users/me/.rvm/gems/ruby-3.1.2@projectbundler/gems/sidekiq-limit_fetch-97084a6352bd/lib/sidekiq/limit_fetch.rb:56:in `bulk_requeue'

@nisyuu nisyuu force-pushed the sidekiq-v7-fix-queues-value branch from adc7f78 to b222c01 Compare January 18, 2023 16:42
@nisyuu
Copy link
Contributor Author

nisyuu commented Jan 18, 2023

Thank you for your comment.
I pushed new commit. Can you check the behavior?

@javinto
Copy link

javinto commented Jan 19, 2023 via email

@nisyuu
Copy link
Contributor Author

nisyuu commented Jan 19, 2023

Thank you.
Did you use sidekiq-v7-fix-queues-value branch of my Fork ? I tried fixed sidekiq-limit_fetch on my development environment and no problems occurred.

@javinto
Copy link

javinto commented Jan 19, 2023 via email

@deanpcmad deanpcmad merged commit e640c8b into deanpcmad:master Jan 22, 2023
@deanpcmad
Copy link
Owner

Thanks!

@nisyuu nisyuu deleted the sidekiq-v7-fix-queues-value branch January 23, 2023 04:56
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.

undefined method `to_sym' for ["active_storage_analysis", 4]:Array
3 participants