update cable for cloud

This commit is contained in:
Aung Myo
2018-04-25 13:18:54 +06:30
parent d0ad95c8d6
commit 9b0a564b9a
10 changed files with 26 additions and 28 deletions

View File

@@ -156,9 +156,9 @@ class DiningFacility < ApplicationRecord
table = DiningFacility.find(table_id)
#Send to background job for processing
# CheckInBookingJob.perform_later(table)
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "check_in_booking_channel",table: table
end
#end
end
def self.checkin_time

View File

@@ -321,9 +321,9 @@ class Order < ApplicationRecord
end
else
msg = ' Print Error ! Please contact to service'
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "call_waiter_channel",table: msg,time:'print_error'
end
#end
if !sidekiq.nil?
OrderQueueProcessorJob.perform_later(self.id, self.table_id)
else
@@ -337,9 +337,9 @@ class Order < ApplicationRecord
end
end
assign_order = AssignedOrderItem.assigned_order_item_by_job(self.id)
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
end
#end
end
end
@@ -376,9 +376,9 @@ class Order < ApplicationRecord
type = 'order'
#Send to background job for processing
# OrderBroadcastJob.perform_later(table,type)
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "order_channel",table: table,type:type
end
#end
end
end
@@ -532,9 +532,9 @@ class Order < ApplicationRecord
end
end
end
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "second_display_channel",data: @data_array,status:@status
end
#end
end
private

View File

@@ -607,9 +607,9 @@ class SalePayment < ApplicationRecord
type = 'payment'
#Send to background job for processing
# OrderBroadcastJob.perform_later(table,type)
if ENV["SERVER_MODE"] != 'cloud'
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "order_channel",table: table,type:type
end
#end
end
end
end