Sha256: 0c1e0de4576c826662abf47a73953207a83bdf7ef2dc74371604cb0efe888ebc
Contents?: true
Size: 508 Bytes
Versions: 7
Compression:
Stored size: 508 Bytes
Contents
require 'rest-client' Application.load 'lib/smartkiosk/sidekiq' module Orders class AcknowledgeWorker include Sidekiq::Worker sidekiq_options :queue => :orders def perform(order_id, error=nil, percent=nil) order = Order.find(order_id) response = RestClient.post "#{Terminal.config.host}/terminal_orders/#{order.foreign_id}/acknowledge", :terminal => Terminal.keyword, :error => error, :percent => percent order.acknowledged! end end end
Version data entries
7 entries across 7 versions & 1 rubygems