diff options
Diffstat (limited to 'app/services/git')
-rw-r--r-- | app/services/git/base_hooks_service.rb | 9 | ||||
-rw-r--r-- | app/services/git/branch_push_service.rb | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/services/git/base_hooks_service.rb b/app/services/git/base_hooks_service.rb index 9d371e234ee..d30df34e54b 100644 --- a/app/services/git/base_hooks_service.rb +++ b/app/services/git/base_hooks_service.rb @@ -17,6 +17,8 @@ module Git # Not a hook, but it needs access to the list of changed commits enqueue_invalidate_cache + update_remote_mirrors + push_data end @@ -92,5 +94,12 @@ module Git def pipeline_options {} end + + def update_remote_mirrors + return unless project.has_remote_mirror? + + project.mark_stuck_remote_mirrors_as_failed! + project.update_remote_mirrors + end end end diff --git a/app/services/git/branch_push_service.rb b/app/services/git/branch_push_service.rb index abf11f253f6..c4910180787 100644 --- a/app/services/git/branch_push_service.rb +++ b/app/services/git/branch_push_service.rb @@ -27,7 +27,6 @@ module Git execute_related_hooks perform_housekeeping - update_remote_mirrors stop_environments true |