discourse/app/jobs/scheduled/top_refresh_today.rb
Robin Ward 0a2036a99a OPTIMIZATION: Don't run 12 queries every 15 mins for the Top section.
Instead, run the daily queries once every hour, and the reset of the
queries once a day.
2014-08-01 16:25:20 -04:00

9 lines
142 B
Ruby

module Jobs
class TopRefreshToday < Jobs::Scheduled
every 1.hour
def execute(args)
TopTopic.refresh_daily!
end
end
end