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