close cable in cloud mode

This commit is contained in:
Aung Myo
2018-04-23 15:39:56 +06:30
parent f503d69181
commit 6e3a5300a6
8 changed files with 35 additions and 15 deletions

View File

@@ -39,7 +39,9 @@ class Origami::RequestBillsController < ApplicationController
# Promotion Activation
Promotion.promo_activate(@sale)
#bill channel
ActionCable.server.broadcast "bill_channel",table: table
if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "bill_channel",table: table
end
if order.source == "quick_service"
result = {:status=> @status, :data => @sale.sale_id }
render :json => result.to_json

View File

@@ -335,9 +335,9 @@ class Origami::SplitBillController < BaseOrigamiController
end
Promotion.promo_activate(sale)
ActionCable.server.broadcast "bill_channel",table: table
if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "bill_channel",table: table
end
render :json => { status: status }
else
render :json => { status: false, error_message: 'No Current Open Shift!'}