blob: 71f7cde45e0a161689fb05722fafbf4c64d4405b (
plain) (
tree)
|
|
# frozen_string_literal: true
class DestructStatusWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executed
def perform(destructing_status_id)
destructing_status = DestructingStatus.find(destructing_status_id)
destructing_status.destroy!
RemoveStatusService.new.call(destructing_status.status)
true
rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid
true
end
end
|