Class: CustomerCreditSyncWorker
- Inherits:
-
Object
- Object
- CustomerCreditSyncWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/customer_credit_sync_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(customer_ids = []) ⇒ Object
6 7 8 9 10 |
# File 'app/workers/customer_credit_sync_worker.rb', line 6 def perform(customer_ids = []) customers = Customer.where(Customer[:credit_limit].gt(0)) customers = customers.where(id: customer_ids) if customer_ids.present? customers.find_each(&:sync_credit_limit) end |