Class: SerpCheap::Rails::SearchJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/serpcheap/rails/search_job.rb

Overview

Warms the result cache off the request cycle:

SerpCheap::Rails::SearchJob.perform_later("best running shoes", "gl" => "br")

Instance Method Summary collapse

Instance Method Details

#perform(query, opts = {}) ⇒ Object



10
11
12
# File 'lib/serpcheap/rails/search_job.rb', line 10

def perform(query, opts = {})
  SerpCheap::Rails.search(query, **symbolize(opts))
end