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

@@ -6,8 +6,9 @@ class Api::CallWaitersController < ActionController::API
@time = params[:time]
@table = DiningFacility.find(@table_id)
# CallWaiterJob.perform_later(@table,@time)
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
end
# get printer info
@shop = Shop.first
unique_code = "CallWaiterPdf"