change action cable issue for quick service

This commit is contained in:
phyusin
2018-05-31 10:29:38 +06:30
parent 6472dbeacb
commit c1961720c8
7 changed files with 73 additions and 33 deletions

View File

@@ -619,16 +619,16 @@ class SalePayment < ApplicationRecord
table.save
end
type = 'payment'
# type = 'payment'
#Send to background job for processing
# OrderBroadcastJob.perform_later(table,type)
#if ENV["SERVER_MODE"] != 'cloud'
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
# if ENV["SERVER_MODE"] == 'cloud'
# from = request.subdomain + "." + request.domain
# else
# from = ""
# end
# ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
#end
end
end