Class: SitemapRegeneratedHandler

Inherits:
Object
  • Object
show all
Defined in:
app/subscribers/sitemap_regenerated_handler.rb

Overview

Sync handler for Events::SitemapRegenerated.

Queues SiteMapContentExtractionWorker to crawl all cacheable pages and
refresh extracted content, rendered schema, and the internal link graph.
Runs synchronously (not ApplicationJob) because all it does is dispatch
to Sidekiq — no need for a double-async layer.

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



11
12
13
14
# File 'app/subscribers/sitemap_regenerated_handler.rb', line 11

def call(event)
  opts = event.data.slice('locale', 'category').compact.stringify_keys
  SiteMapContentExtractionWorker.perform_async(opts.presence)
end