我在config文件夹中创建了sidekiq.yml
文件:
---
:concurrency: 25
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:queues:
-default
我在我的Rails项目中添加了foreman
gem并在我的根文件夹中创建了Procfile:
web: bundle exec rails s
worker: sidekiq -C config/sidekiq.yml
当我在命令行中运行foreman时,它只是不想启动。消息是:
C:\Users\lenovo\RubymineProjects\new-seeker-test>foreman start
11:41:39 web.1 | started with pid 8088
11:41:39 worker.1 | started with pid 7920
11:41:40 web.1 | DL is deprecated, please use Fiddle
11:41:40 worker.1 | undefined method `each' for "-default":String
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq- 3.3.4/lib/sidekiq/cli.rb:378:in `parse_queues'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq- 3.3.4/lib/sidekiq/cli.rb:363:in `parse_config'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:212:in `setup_options'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/lib/sidekiq/cli.rb:38:in `parse'
11:41:40 worker.1 | D:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sidekiq-3.3.4/bin/sidekiq:7:in `<top (required)>'
11:41:40 worker.1 | D:/Ruby21-x64/bin/sidekiq:23:in `load'
11:41:40 worker.1 | D:/Ruby21-x64/bin/sidekiq:23:in `<main>'
11:41:40 worker.1 | exited with code 1
11:41:40 system | sending SIGKILL to all processes
11:41:40 system | sending SIGKILL to web.1 at pid 8088
11:41:40 web.1 | exited with code 0
我认为11:41:40 worker.1 | undefined method 'each' for "-default":String
我的红宝石版本是2.1.5 Rails版本是4.2.0 Windows 7 x64
答案 0 :(得分:0)
YAML文件中的队列列表无效。破折号后你需要一个空格。
https://github.com/mperham/sidekiq/wiki/Advanced-Options#the-sidekiq-configuration-file