BigW Consortium Gitlab

project_cache_worker.rb 310 Bytes
Newer Older
1 2 3 4 5 6
class ProjectCacheWorker
  include Sidekiq::Worker

  sidekiq_options queue: :default

  def perform(project_id)
7 8 9
    project = Project.find(project_id)
    project.update_repository_size
    project.update_commit_count
10 11 12 13

    if project.repository.root_ref
      project.repository.build_cache
    end
14 15
  end
end