mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:19:52 +01:00
15 lines
357 B
Ruby
15 lines
357 B
Ruby
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
|
|
logger.info "failed to delete user: #{e.message}"
|
|
Sentry.capture_exception(e)
|
|
end
|
|
end
|
|
end
|