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

error without queues configuration #9

Open
flavono123 opened this issue Jun 2, 2020 · 0 comments
Open

error without queues configuration #9

flavono123 opened this issue Jun 2, 2020 · 0 comments

Comments

@flavono123
Copy link
Contributor

# config/delayed_job_master.rb
# Error configuration
add_worker do |worker|
  worker.queues
  # or without above code
  ...
end
...
# Working configuration
add_worker do |worker|
  worker.queues []
end
...

To set worker's queues as default, the all available queues, the configurations worker.queues (nil) or not declare anything are not working with followed error message:

NoMethodError: undefined method `any?' for nil:NilClass at /mnt/crema-bg-rails/shared/bundle/ruby/2.7.0/gems/delayed_job_master-2.0.0/lib/delayed/master/monitoring.rb: 32

Set it as an empty array, it works(worker.queues []). It seems like a bug. (If nil is respond to #any? and it returns true?)

IMO, the reason is from that configuration methods are defined both reader and writer with the same method name:
https://github.com/kanety/delayed_job_master/blob/master/lib/delayed/master/config.rb#L83-L91

How about separate them? In #queues and #queues=?

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

1 participant