Class: AuthorizedProjectsWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker
Defined in:
app/workers/authorized_projects_worker.rb

Constant Summary

Constants included from ApplicationWorker

ApplicationWorker::LOGGING_EXTRA_KEY

Constants included from WorkerAttributes

WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Class Method Details

.bulk_perform_and_wait(args_list, timeout: 10) ⇒ Object


17
18
# File 'app/workers/authorized_projects_worker.rb', line 17

def self.bulk_perform_and_wait(args_list, timeout: 10)
end

.bulk_perform_inline(args_list) ⇒ Object


20
21
# File 'app/workers/authorized_projects_worker.rb', line 20

def self.bulk_perform_inline(args_list)
end

Instance Method Details

#perform(user_id) ⇒ Object

rubocop: disable CodeReuse/ActiveRecord


25
26
27
28
29
# File 'app/workers/authorized_projects_worker.rb', line 25

def perform(user_id)
  user = User.find_by(id: user_id)

  user&.refresh_authorized_projects
end