As part of a capistrano deploy with Sinatra:
* executing `sidekiq:start'
* executing "cd /var/www/nodes/current ; nohup bundle exec sidekiq -e production -C /var/www/nodes/current/config/sidekiq.yml -P /var/www/nodes/current/tmp/pids/sidekiq.pid -r /var/www/nodes/current/app/nodes.rb >> /var/www/nodes/current/log/sidekiq.log 2>&1 &"
I cannot see anyway to get the -r (require) to point to my Sinatra as per sidekiq/issues/10 . The app lives in ./app/nodes.rb.
my config.ru is
require './app/nodes'
run Nodes
map '/sidekiq' do
run Sidekiq::Web
end
'./app/nodes' loads in all the environment both nodes and sidekiq needs to run.
In sidekiq/capistrano.rb there is currently no option to pass in an -r flag.
sidekiq.log reports this error, as expected:
2012-10-12T01:04:59Z 8175 TID-bf65s INFO:
2012-10-12T01:04:59Z 8175 TID-bf65s INFO: Please point sidekiq to a Rails 3 application or a Ruby file
2012-10-12T01:04:59Z 8175 TID-bf65s INFO: to load your worker classes with -r [DIR|FILE].
2012-10-12T01:04:59Z 8175 TID-bf65s INFO:
Any ideas?
V
Resolved by Mike Perham, creator of Sidekiq: on github. In the sidekiq.yml, you can add a specific require option. Thanks very much!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With