Break the hourly/daily/weekly/monthly maintenance tasks down into individual delayed jobs. This way if one task fails, it won't prevent other tasks from running. Also, jobs can be run in parallel, and can be individually retried if they fail.
8 lines
187 B
Ruby
8 lines
187 B
Ruby
# A job that runs monthly to demote all inactive approvers. Spawned by
|
|
# {DanbooruMaintenance}.
|
|
class PruneApproversJob < ApplicationJob
|
|
def perform
|
|
ApproverPruner.prune!
|
|
end
|
|
end
|