RailsStudyGroup/redditgraphed

View on GitHub
app/jobs/get_top_ten_job.rb

Summary

Maintainability
A
0 mins
Test Coverage
class GetTopTenJob < ActiveJob::Base
  after_perform do
    GetTopTenJob.set(wait: 5.minute).perform_later
  end
  queue_as :default

  def perform(*)
    Subscriber.save_top_ten
  end
end
GetTopTenJob.perform_now