Welcome to mirror list, hosted at ThFree Co, Russian Federation.

approve_blocked_pending_approval_users_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 661ec87c1dd180dc3ed34095ed098b977fedfe88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class ApproveBlockedPendingApprovalUsersWorker
  include ApplicationWorker

  data_consistency :always

  sidekiq_options retry: 3

  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