maintenance: prune approvers monthly instead of weekly.
* Move approver pruning from a weekly task to a monthly task. * Move weekly maintenance tasks from Wednesdays at 1:30am to Sundays at midnight (UTC).
This commit is contained in:
@@ -23,10 +23,13 @@ module DanbooruMaintenance
|
||||
|
||||
def weekly
|
||||
safely { UserPasswordResetNonce.prune! }
|
||||
safely { ApproverPruner.prune! }
|
||||
safely { TagRelationshipRetirementService.find_and_retire! }
|
||||
end
|
||||
|
||||
def monthly
|
||||
safely { ApproverPruner.prune! }
|
||||
end
|
||||
|
||||
def regenerate_post_counts!
|
||||
updated_tags = Tag.regenerate_post_counts!
|
||||
updated_tags.each do |tag|
|
||||
|
||||
@@ -3,14 +3,18 @@ env "RAILS_LOG_TO_STDOUT", "true"
|
||||
|
||||
set :output, "log/whenever.log"
|
||||
|
||||
every 1.hour do
|
||||
every :hour do
|
||||
rake "maintenance:hourly"
|
||||
end
|
||||
|
||||
every 1.day do
|
||||
every :day do
|
||||
rake "maintenance:daily"
|
||||
end
|
||||
|
||||
every 1.week, :at => "1:30 am" do
|
||||
every :sunday do
|
||||
rake "maintenance:weekly"
|
||||
end
|
||||
|
||||
every :month do
|
||||
rake "maintenance:monthly"
|
||||
end
|
||||
|
||||
@@ -15,4 +15,9 @@ namespace :maintenance do
|
||||
task weekly: :environment do
|
||||
DanbooruMaintenance.weekly
|
||||
end
|
||||
|
||||
desc "Run monthly maintenance jobs"
|
||||
task monthly: :environment do
|
||||
DanbooruMaintenance.monthly
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user