Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 284 Bytes
module DelayedJob
class Server < Sinatra::Base
post "/enqueue" do
request.body.rewind
job = MultiJson.load(request.body)
request.body.rewind
Qu.enqueue(job["klass"], job["args"])
[202, {"Content-Type" => "application/json"}, ""]
end
end
end