summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-15 10:51:38 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-15 10:51:38 +0000
commitea7d062fa60e3e622288237fc66a815348bbcf36 (patch)
tree69957b37821b4593ed9e75c330a5c650150cd3c3 /app/controllers
parentbe3a9440af7cedcf60dc1bb64c63f1786dc565bc (diff)
parent30b36c92c386e93b432166fb6f9dd973882a6d82 (diff)
downloadgitlab-ce-ea7d062fa60e3e622288237fc66a815348bbcf36.tar.gz
Merge branch 'auto-gc' into 'master' revert-01160fc0
Run 'git gc' every 10 pushes Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14250 Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12620 Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/254 Associated gitlab-shell MR: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/44 See merge request !3206
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index c70add86a20..36f37221c58 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -172,10 +172,15 @@ class ProjectsController < ApplicationController
def housekeeping
::Projects::HousekeepingService.new(@project).execute
- respond_to do |format|
- flash[:notice] = "Housekeeping successfully started."
- format.html { redirect_to project_path(@project) }
- end
+ redirect_to(
+ project_path(@project),
+ notice: "Housekeeping successfully started"
+ )
+ rescue ::Projects::HousekeepingService::LeaseTaken => ex
+ redirect_to(
+ edit_project_path(@project),
+ alert: ex.to_s
+ )
end
def toggle_star