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