Class: GoogleFeedGeneratorWorker
- Inherits:
-
Object
- Object
- GoogleFeedGeneratorWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/google_feed_generator_worker.rb
Overview
Runs the google feed generator async
Instance Method Summary collapse
-
#perform(options = {}) ⇒ Object
options: catalog_ids: list of catalog id to focus on catalog_item_ids: list of catalog item id to focus on.
Instance Method Details
#perform(options = {}) ⇒ Object
options:
catalog_ids: list of catalog id to focus on
catalog_item_ids: list of catalog item id to focus on
11 12 13 14 15 16 |
# File 'app/workers/google_feed_generator_worker.rb', line 11 def perform( = {}) catalog_ids = ['catalog_ids'].presence catalog_item_ids = ['catalog_item_ids'].presence catalogs = Catalog.where(id: catalog_ids) if catalog_ids.present? Feed::Google::ListGenerator.new.process(catalogs: catalogs, catalog_item_ids: catalog_item_ids) end |