Skip to content

Instantly share code, notes, and snippets.

View nandokakimoto's full-sized avatar

Fernando Kakimoto nandokakimoto

View GitHub Profile
@nandokakimoto
nandokakimoto / billing_service.rb
Created March 27, 2017 02:17
Simple Active Job example with shipping details (backward compatible)
class BillingService
def self.process(order, shipping_details={})
Rails.logger.info "Processing order #{order.id} with details: #{shipping_details}..."
sleep(3)
Rails.logger.info "Order #{order.id} processed successfully."
end
end
@nandokakimoto
nandokakimoto / billing_service.rb
Created March 27, 2017 01:46
Simple Active Job example with shipping details
class BillingService
def self.process(order, shipping_details)
Rails.logger.info "Processing order #{order.id} with details: #{shipping_details}..."
sleep(3)
Rails.logger.info "Order #{order.id} processed successfully."
end
end
@nandokakimoto
nandokakimoto / billing_service.rb
Created March 27, 2017 01:17
Simple Active Job example
class BillingService
def self.process(order)
Rails.logger.info "Processing order #{order.id}..."
sleep(3)
Rails.logger.info "Order #{order.id} processed successfully."
end
end