Ruby on Rails: How to run things in the background?

前端 未结 7 1943
暖寄归人
暖寄归人 2020-12-07 12:32

When a new resource is created and it needs to do some lengthy processing before the resource is ready, how do I send that processing away into the

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 12:48

    You should definitely check out the following Railscasts:

    • http://railscasts.com/episodes/127-rake-in-background
    • http://railscasts.com/episodes/128-starling-and-workling
    • http://railscasts.com/episodes/129-custom-daemon
    • http://railscasts.com/episodes/366-sidekiq

    They explain how to run background processes in Rails in every possible way (with or without a queue ...)

提交回复
热议问题