Commit 5ceb31e7 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sh-update-repo-size-after-import' into 'master'

Update repository size after import

See merge request gitlab-org/gitlab!49319
parents 10e4032f 7da4c4fc
...@@ -1843,6 +1843,7 @@ class Project < ApplicationRecord ...@@ -1843,6 +1843,7 @@ class Project < ApplicationRecord
wiki.repository.expire_content_cache wiki.repository.expire_content_cache
DetectRepositoryLanguagesWorker.perform_async(id) DetectRepositoryLanguagesWorker.perform_async(id)
ProjectCacheWorker.perform_async(self.id, [], [:repository_size])
# The import assigns iid values on its own, e.g. by re-using GitHub ids. # The import assigns iid values on its own, e.g. by re-using GitHub ids.
# Flush existing InternalId records for this project for consistency reasons. # Flush existing InternalId records for this project for consistency reasons.
......
---
title: Update repository size after import
merge_request: 49319
author:
type: fixed
...@@ -4981,6 +4981,7 @@ RSpec.describe Project, factory_default: :keep do ...@@ -4981,6 +4981,7 @@ RSpec.describe Project, factory_default: :keep do
expect(project).to receive(:after_create_default_branch) expect(project).to receive(:after_create_default_branch)
expect(project).to receive(:refresh_markdown_cache!) expect(project).to receive(:refresh_markdown_cache!)
expect(InternalId).to receive(:flush_records!).with(project: project) expect(InternalId).to receive(:flush_records!).with(project: project)
expect(ProjectCacheWorker).to receive(:perform_async).with(project.id, [], [:repository_size])
expect(DetectRepositoryLanguagesWorker).to receive(:perform_async).with(project.id) expect(DetectRepositoryLanguagesWorker).to receive(:perform_async).with(project.id)
expect(project).to receive(:write_repository_config) expect(project).to receive(:write_repository_config)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment