mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Moved work into thread to repsond quickly
This commit is contained in:
@@ -85,6 +85,7 @@ class QboController < ApplicationController
|
||||
|
||||
# proceed if the request is good
|
||||
if hash.eql? signature
|
||||
Thread.new do
|
||||
if request.headers['content-type'] == 'application/json'
|
||||
data = JSON.parse(data)
|
||||
else
|
||||
@@ -123,6 +124,10 @@ class QboController < ApplicationController
|
||||
# Record that last time we updated
|
||||
Qbo.update_time_stamp
|
||||
|
||||
end
|
||||
ActiveRecord::Base.connection.close
|
||||
end
|
||||
|
||||
# The webhook doesn't require a response but let's make sure we don't send anything
|
||||
render :nothing => true, status: 200
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user