try to fix new process

This commit is contained in:
Harry Bomrah 2015-08-25 19:20:03 +08:00
parent 70b5bb6606
commit 771d7d8d4c
2 changed files with 6 additions and 5 deletions

View File

@ -185,12 +185,12 @@ class Admin::TicketsController < OrbitAdminController
response.internal_response = params[:internal_response] if params[:internal_response].present?
response.user_tags = params[:user_tags] if params[:user_tags].present?
response.save
if params[:user_tags].present?
send_notification_emails(response, tq.ticket)
# p1 = fork { send_notification_emails(response, tq.ticket) }
# Process.detach(p1)
end
tq.ticket_query_responses << response
if params[:user_tags].present?
# send_notification_emails(response, tq.ticket)
p1 = fork { send_notification_emails(response, tq.ticket) }
Process.detach(p1)
end
render :partial => "response", :object => response
else
render :json => {"success" => true}.to_json

View File

@ -17,6 +17,7 @@ module TicketsHelper
if !user.nil?
mp = user.member_profile
send_email(mp.email,ticket,response,user.name) if !mp.email.nil?
sleep(2.seconds)
end
end
end