Run background process in Sinatra
I have a Sinatra / Rails application and an activity that starts a long running process.
Normal I am making a queue for background jobs. But this case is too simple and the background process starts very rarely, so the queue is an overhead.
So how do I start a background process out of the queue?
get "/build_logs/:project" do LogBuilder.new(params[:project]).generate "done" end
I tried to do it as a new fork of Thread or Process, but it didn't help.
source to share