retrospring/app/workers/deletion_worker.rb

16 lines
357 B
Ruby
Raw Normal View History

class DeletionWorker
include Sidekiq::Worker
sidekiq_options queue: :deletion, retry: false
# @param resource_id [Integer] user id passed from Devise
def perform(resource_id)
begin
User.find(resource_id).destroy!
rescue => e
2015-07-27 09:18:10 +02:00
logger.info "failed to delete user: #{e.message}"
2021-12-28 18:32:03 +01:00
Sentry.capture_exception(e)
end
end
end