18 lines
375 B
Ruby
18 lines
375 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
|