Class: MassSearch::ItemAddToNextCycleCountWorker

Inherits:
Object
  • Object
show all
Includes:
Workers::MassSearchWorker
Defined in:
app/workers/mass_search/item_add_to_next_cycle_count_worker.rb

Overview

Flags StoreItems for the next cycle count for each selected Item.
action_params: { target_store_id: } — "both" means store IDs [1, 2]

Instance Method Summary collapse

Methods included from Workers::MassSearchWorker

included

Instance Method Details

#build_enumerator(args, cursor:) ⇒ Object

Build enumerator.

Parameters:

  • args (Array)

    the args to build

  • cursor (Object)

    the cursor to build

Returns:

  • (Object)

    the result



13
14
15
16
17
18
# File 'app/workers/mass_search/item_add_to_next_cycle_count_worker.rb', line 13

def build_enumerator(args, cursor:)
  super
  raw = @action_params[:target_store_id]
  @store_ids = raw == 'both' ? [1, 2] : [raw.to_i]
  active_record_records_enumerator(@search.search_results, cursor: cursor)
end