Class: Workarea::GenerateContentMetadata

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/workarea/generate_content_metadata.rb

Instance Method Summary collapse

Instance Method Details

#perform(*args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/workers/workarea/generate_content_metadata.rb', line 5

def perform(*args)
  Catalog::Category.all.each_by(100) do |category|
    Metadata.update(Content.for(category))
  end

  Content::Page.all.each_by(100) do |page|
    Metadata.update(Content.for(page))
  end

  Metadata::HomePage.new(Content.for('home_page')).update
end