Class: Gera::DirectionsRatesWorker
- Inherits:
-
Object
- Object
- Gera::DirectionsRatesWorker
- Includes:
- ActiveSupport::Callbacks, AutoLogger, Sidekiq::Worker
- Defined in:
- app/workers/gera/directions_rates_worker.rb
Constant Summary collapse
- Error =
Class.new StandardError
Instance Method Summary collapse
-
#perform(*_args) ⇒ Object
exchange_rate_id - ID of changes exchange_rate.
Instance Method Details
#perform(*_args) ⇒ Object
exchange_rate_id - ID of changes exchange_rate
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/workers/gera/directions_rates_worker.rb', line 16 def perform(*_args) # exchange_rate_id: nil) logger.info 'start' run_callbacks :perform do DirectionRate.transaction do ExchangeRate.includes(:payment_system_from, :payment_system_to).find_each do |exchange_rate| safe_create(exchange_rate) end end end logger.info 'finish' end |