Class: MassSearch::ProductCatalogSalePriceWorker
- Inherits:
-
Object
- Object
- MassSearch::ProductCatalogSalePriceWorker
- Includes:
- MassSearchWorker
- Defined in:
- app/workers/mass_search/product_catalog_sale_price_worker.rb
Overview
Updates sale prices for selected CatalogItems via Catalog::UpdateCatalogItem.
This iterates over the per-catalog-item params keyed by catalog_item_id rather than
search_results, so it uses MassSearchWorker and looks up per-item params by resource id.
action_params: { catalog_item: { "12345" => { sale_price:, coupon_id: }, ... } }
Instance Method Summary collapse
Instance Method Details
#build_enumerator(args, cursor:) ⇒ Object
10 11 12 13 14 |
# File 'app/workers/mass_search/product_catalog_sale_price_worker.rb', line 10 def build_enumerator(args, cursor:) super @updater = Catalog::UpdateCatalogItem.new active_record_records_enumerator(@search.search_results, cursor: cursor) end |