diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-11 10:16:03 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-11 10:16:03 +0100 |
commit | be3d74e096f6b5cb46b5d2440c16383633f1fc06 (patch) | |
tree | 351d2afe605fbe2a005315d66d5fba18f031396e /app/models | |
parent | 4a7fcc2af6eba65dff48b25c81d5925311fa933d (diff) | |
download | gitlab-ce-be3d74e096f6b5cb46b5d2440c16383633f1fc06.tar.gz |
Do not call environments service in repository model
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 38e5cd3faa9..30be7262438 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -203,7 +203,7 @@ class Repository update_ref!(ref, newrev, oldrev) end - after_remove_branch(user, branch_name) + after_remove_branch true end @@ -524,12 +524,7 @@ class Repository end # Runs code after an existing branch has been removed. - def after_remove_branch(user, branch_name) - expire_branch_cache_after_removal - stop_environments_for_branch(user, branch_name) - end - - def expire_branch_cache_after_removal + def after_remove_branch expire_has_visible_content_cache expire_branch_count_cache expire_branches_cache @@ -1170,10 +1165,4 @@ class Repository def repository_event(event, tags = {}) Gitlab::Metrics.add_event(event, { path: path_with_namespace }.merge(tags)) end - - def stop_environments_for_branch(user, branch_name) - Ci::StopEnvironmentService - .new(@project, user) - .execute(branch_name) - end end |