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
|
# proceed if the request is good
|
||||||
if hash.eql? signature
|
if hash.eql? signature
|
||||||
|
Thread.new do
|
||||||
if request.headers['content-type'] == 'application/json'
|
if request.headers['content-type'] == 'application/json'
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
else
|
else
|
||||||
@@ -123,6 +124,10 @@ class QboController < ApplicationController
|
|||||||
# Record that last time we updated
|
# Record that last time we updated
|
||||||
Qbo.update_time_stamp
|
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
|
# The webhook doesn't require a response but let's make sure we don't send anything
|
||||||
render :nothing => true, status: 200
|
render :nothing => true, status: 200
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user