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

project_cache_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 55cb6af232e97c68496b93e42c0816bfdea789f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class ProjectCacheWorker
  include Sidekiq::Worker

  sidekiq_options queue: :default

  def perform(project_id)
    project = Project.find(project_id)
    project.update_repository_size
    project.update_commit_count

    if project.repository.root_ref
      project.repository.build_cache
    end
  end
end