19 lines
395 B
Ruby
19 lines
395 B
Ruby
class OrderQueueProcessorJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(order_id)
|
|
# Do something later
|
|
#Order ID
|
|
order = Order.find(order_id)
|
|
puts order_id
|
|
puts order
|
|
#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
|