Best practice for Rails App to run a long task in the background?

后端 未结 14 1493
时光取名叫无心
时光取名叫无心 2020-12-07 20:49

I have a Rails application that unfortunately after a request to a controller, has to do some crunching that takes awhile. What are the best practices in Rails for providin

14条回答
  •  我在风中等你
    2020-12-07 21:27

    Check out BackgrounDRb, it is designed for exactly the scenario you are describing.

    I think it has been around for a while and is pretty mature. You can monitor the status of the workers.

    It's a pretty good idea to develop on the same development platform as your production environment, especially when working with Rails. The suggestion to run Linux in a VM is a good one. Check out Sun xVM for Open Source virtualization software.

提交回复
热议问题