mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
20 lines
513 B
Ruby
20 lines
513 B
Ruby
require_dependency 'score_calculator'
|
|
|
|
module Jobs
|
|
|
|
# This job will run on a regular basis to update statistics and denormalized data.
|
|
# If it does not run, the site will not function properly.
|
|
class Daily < Jobs::Scheduled
|
|
every 1.day
|
|
|
|
def execute(args)
|
|
# TODO: optimise this against a big site before doing this any more
|
|
# frequently
|
|
#
|
|
# current implementation wipes an entire table and rebuilds causing huge
|
|
# amounts of IO
|
|
TopTopic.refresh!
|
|
end
|
|
end
|
|
end
|