2019-05-03 08:17:27 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-02-27 11:45:20 +11:00
|
|
|
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.
|
2019-10-02 14:01:53 +10:00
|
|
|
class Weekly < ::Jobs::Scheduled
|
2014-02-27 11:45:20 +11:00
|
|
|
every 1.week
|
|
|
|
|
|
|
|
def execute(args)
|
|
|
|
ScoreCalculator.new.calculate
|
2019-01-18 16:36:11 +08:00
|
|
|
MiniScheduler::Stat.purge_old
|
2015-06-02 13:45:47 +10:00
|
|
|
Draft.cleanup!
|
2017-01-31 17:21:37 -05:00
|
|
|
UserAuthToken.cleanup!
|
2019-10-30 16:54:35 +11:00
|
|
|
Email::Cleaner.delete_rejected!
|
2020-02-24 11:42:50 +11:00
|
|
|
Notification.purge_old!
|
2020-10-14 09:38:57 +10:00
|
|
|
Bookmark.cleanup!
|
2014-02-27 11:45:20 +11:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|