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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-03 15:06:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-03 15:06:00 +0300
commit927cfbfe63dd3dc64df9d341d7c4328a2fe3597f (patch)
treecaa1dc128491ed9dbfdcd40737db429f4b066707 /app/workers/post_receive.rb
parent2b67531b0fd7c94cb1d8618166c4193f40ea5a1f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/post_receive.rb')
-rw-r--r--app/workers/post_receive.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb
index 63a32083b5d..cae3cb45c45 100644
--- a/app/workers/post_receive.rb
+++ b/app/workers/post_receive.rb
@@ -70,6 +70,7 @@ class PostReceive
refs << ref
end
+ update_remote_mirrors(post_received)
after_project_changes_hooks(post_received, user, refs.to_a, changes)
end
@@ -93,6 +94,16 @@ class PostReceive
)
end
+ def update_remote_mirrors(post_received)
+ return unless post_received.includes_branches? || post_received.includes_tags?
+
+ project = post_received.project
+ return unless project.has_remote_mirror?
+
+ project.mark_stuck_remote_mirrors_as_failed!
+ project.update_remote_mirrors
+ end
+
def after_project_changes_hooks(post_received, user, refs, changes)
hook_data = Gitlab::DataBuilder::Repository.update(post_received.project, user, changes, refs)
SystemHooksService.new.execute_hooks(hook_data, :repository_update_hooks)