Websites/app/jobs/e621_thumbnail_error_cleanup_job.rb

11 lines
313 B
Ruby
Raw Normal View History

2024-05-03 03:04:43 +00:00
# frozen_string_literal: true
class E621ThumbnailErrorCleanupJob < ApplicationJob
queue_as :default
def perform(entry)
raise(StandardError, "Attempted to call E621ThumbnailErrorCleanupJob with a non-error status entry: #{entry.status}") unless entry.error? || entry.timeout?
entry.destroy
end
end