Class: Launchpad::IEO::SaleReleaseFundsWorker
- Inherits:
-
Object
- Object
- Launchpad::IEO::SaleReleaseFundsWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- app/workers/launchpad/ieo/sale_release_funds_worker.rb
Overview
TODO: Document code.
Instance Method Summary collapse
Instance Method Details
#perform(sgid, funds_percent) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/workers/launchpad/ieo/sale_release_funds_worker.rb', line 9 def perform(sgid, funds_percent) sale = GlobalID::Locator.locate_signed(sgid, for: 'sale_release_funds') Rails.logger.info { "Start sale: #{sale.id} releasing funds" } begin sale.orders.release_fund(funds_percent) rescue ManagementAPIV2::Exception => e Rails.logger.error sale_id: sale.id, message: 'Failed to release sale', error: e. end end |