我需要在生成頁面並將其發送給用戶後執行一些圖像操作(可能需要很長時間)。這項工作完成後,不要讓用戶等待。就像這樣:生成頁面後最簡單的方式生成併發送給用戶
if @post.save!
redirect_to :action => :index
# Now user is redirected and don't need to wait
# doing job in a background
do_image_manipulation
end
我想避免daemonizing。