Websites/app/jobs/e621_thumbnail_error_cleanup_job.rb
2024-05-02 22:04:43 -05:00

11 lines
313 B
Ruby

# 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