2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-02-27 08:45:20 +08: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 12:01:53 +08:00
|
|
|
class Weekly < ::Jobs::Scheduled
|
2014-02-27 08:45:20 +08: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 11:45:47 +08:00
|
|
|
Draft.cleanup!
|
2017-02-01 06:21:37 +08:00
|
|
|
UserAuthToken.cleanup!
|
2019-08-21 16:23:20 +08:00
|
|
|
Upload.reset_unknown_extensions!
|
2019-10-30 13:54:35 +08:00
|
|
|
Email::Cleaner.delete_rejected!
|
2014-02-27 08:45:20 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|