Reputation: 307
i'm using sidekiq in a rails DEVELOPMENT environment with rvm and passenger.
At app's boot, i need to manually start Sidekiq with:
bundle exec sidekiq --environment development -C sidekiq.yml
is ther a way to Autostart it on App start or restart (not server boot) ?
thanks
Upvotes: 0
Views: 833
Reputation: 26
Use the foreman gem. With foreman, you declare all the processes your app requires to run in a Procfile
.
See a sample Procfile
definition of an app using puma and sidekiq below:
web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq --environment development -C sidekiq.yml
The foreman start
command starts your app.
Upvotes: 1