2020-12-10 21:10:15 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ApproveBlockedPendingApprovalUsersWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2020-12-10 21:10:15 +00:00
|
|
|
idempotent!
|
|
|
|
|
|
|
|
feature_category :users
|
|
|
|
|
|
|
|
def perform(current_user_id)
|
|
|
|
current_user = User.find(current_user_id)
|
|
|
|
|
|
|
|
User.blocked_pending_approval.find_each do |user|
|
|
|
|
Users::ApproveService.new(current_user).execute(user)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|