debian-mirror-gitlab/app/workers/authorized_projects_worker.rb
2023-07-09 08:55:56 +05:30

21 lines
404 B
Ruby

# frozen_string_literal: true
class AuthorizedProjectsWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
feature_category :system_access
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