Class: Launchpad::IEO::SaleDistributeWorker
- Inherits:
-
Object
- Object
- Launchpad::IEO::SaleDistributeWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- app/workers/launchpad/ieo/sale_distribute_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(sgid) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/workers/launchpad/ieo/sale_distribute_worker.rb', line 7 def perform(sgid) sale = GlobalID::Locator.locate_signed(sgid, for: 'sale_distribute') sale.distribute! Rails.logger.info { "Start #{sale.id} sale distribution" } rescue AASM::InvalidTransition => e # TODO: Improve logging using Tagged Logger. Rails.logger.error sale_id: sale.id, message: 'Failed to distribute', error: e. end |