This commit is contained in:
Aung Myo
2017-09-01 16:55:51 +06:30
parent 2be93e413d
commit fc5192157b
11 changed files with 55 additions and 38 deletions

View File

@@ -4,8 +4,9 @@ class OrderQueueProcessorJob < ApplicationJob
def perform(order_id, table_id)
# Do something later
#Order ID
order = Order.find(order_id)
order = Order.find(order_id)
ActionCable.server.broadcast "order_queue_station_channel",message: order
#Loop through the order stations and process the items
#Execute orders and send to order stations
if order
@@ -13,5 +14,8 @@ class OrderQueueProcessorJob < ApplicationJob
oqs.process_order(order, table_id)
end
end
end