uploads: mark uploads as failed if they're stuck processing for more than 4 hours.
This commit is contained in:
11
app/jobs/prune_uploads_job.rb
Normal file
11
app/jobs/prune_uploads_job.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A job that runs hourly to mark as failed all uploads that got stuck in the 'processing' state for more than 4 hours.
|
||||
# Spawned by {DanbooruMaintenance}.
|
||||
class PruneUploadsJob < ApplicationJob
|
||||
def perform
|
||||
MediaAsset.prune!
|
||||
UploadMediaAsset.prune!
|
||||
Upload.prune!
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user