Files
sx-fc/app/jobs/order_queue_processor_job.rb
2017-06-03 13:44:10 +06:30

18 lines
371 B
Ruby

class OrderQueueProcessorJob < ApplicationJob
queue_as :default
def perform(order_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)
end
end
end