uploads: mark uploads as failed if they're stuck processing for more than 4 hours.

This commit is contained in:
evazion
2022-11-20 23:34:18 -06:00
parent 570d6a9d01
commit ba1cf14c7e
6 changed files with 47 additions and 0 deletions

View 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