Class: CycleCountSchedulerWorker
- Inherits:
-
Object
- Object
- CycleCountSchedulerWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/cycle_count_scheduler_worker.rb
Overview
Sidekiq worker: cycle count scheduler.
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 |
# File 'app/workers/cycle_count_scheduler_worker.rb', line 7 def perform Store.where(id: [1, 2]).find_each do |store| Item::CycleCountScheduler.new(store.id).process InventoryMailer.cycle_counts_due(store).deliver_now if store.cycle_counts.exists?(state: 'draft', marketing_only: false) end end |