mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 22:16:17 +08:00
c32bd8ae48
Adds the settings: raw_email_max_length, raw_rejected_email_max_length, delete_rejected_email_after_days. These settings control retention of the "raw" emails logs. raw_email_max_length ensures that if we get incoming email that is huge we will truncate it removing uploads from the raw log. raw_rejected_email_max_length introduces an even more aggressive truncation for rejected incoming mail. delete_rejected_email_after_days controls how many days we will keep rejected emails for (default 90)
20 lines
482 B
Ruby
20 lines
482 B
Ruby
# frozen_string_literal: true
|
|
|
|
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 Weekly < ::Jobs::Scheduled
|
|
every 1.week
|
|
|
|
def execute(args)
|
|
ScoreCalculator.new.calculate
|
|
MiniScheduler::Stat.purge_old
|
|
Draft.cleanup!
|
|
UserAuthToken.cleanup!
|
|
Upload.reset_unknown_extensions!
|
|
Email::Cleaner.delete_rejected!
|
|
end
|
|
end
|
|
end
|