gitlab-org--gitlab-foss/app/workers/authorized_projects_worker.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
448 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AuthorizedProjectsWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
prepend WaitableWorker
feature_category :authentication_and_authorization
urgency :high
weight 2
idempotent!
loggable_arguments 1 # For the job waiter key
def perform(user_id)
user = User.find_by_id(user_id)
user&.refresh_authorized_projects(source: self.class.name)
end
end