Files
sx-fc/app/jobs/order_queue_processor_job.rb
2017-06-16 18:55:14 +06:30

18 lines
395 B
Ruby

class OrderQueueProcessorJob < ApplicationJob
queue_as :default
def perform(order_id, table_id)
# Do something later
#Order ID
order = Order.find(order_id)
#Loop through the order stations and process the items
#Execute orders and send to order stations
if order
oqs = OrderQueueStation.new
oqs.process_order(order, table_id)
end
end
end