我需要在生成页面并将其发送给用户后执行一些图像操作(可能需要很长时间)。这项工作完成后,不要让用户等待。就像这样:生成页面后最简单的方式生成并发送给用户
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。