Rails 3 Sidekiq Passenger

纵饮孤独 提交于 2019-12-11 01:37:51

问题


I am able to get Sidekiq scheduler working locally. The last obstacle in my way is how to deploy this to a production app on passenger. Can someone point me in the right direction on how to run Sidekiq continuously on passenger.

Appreciate it.


回答1:


Passenger is a Apache\nginx module for running Rails\Rack apps.

Sidekiq is a threaded background worker queue that usually is run with JRuby in production.

You do not run Sidekiq through Passenger.

Rather, just configure Passenger to run and serve you app as needed. Then you can start Sidekiq and have it poll Redis for work. It is highly recommend you use either JRuby or Rubinius so you take full advantage of Sidekiq's threaded nature.

For more details on deploying Sidekiq, refer to the wiki: https://github.com/mperham/sidekiq/wiki/Deployment

For more details on configuring Passenger refer to it's docs (for either Apache or nginx): https://www.phusionpassenger.com/support#documentation

Update: From the creator of Sidekiq there is a library called Girl Friday. This library adds an asynchronous job queue but runs inline with your Rails application (or other Rack app). This option can greatly simplify deployment and save money!



来源:https://stackoverflow.com/questions/13432245/rails-3-sidekiq-passenger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!