Class: FeedRunnerWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/workers/feed_runner_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(feed_id = nil) ⇒ Object



6
7
8
9
10
11
12
# File 'app/workers/feed_runner_worker.rb', line 6

def perform(feed_id = nil)
  if feed_id # single run
    Feed.find(feed_id).run
  else # global run
    Feed.process_feeds
  end
end