summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects_controller.rb8
-rw-r--r--app/services/projects/housekeeping_service.rb2
2 files changed, 3 insertions, 7 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 27b723fae6a..ecaf4476246 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -172,14 +172,10 @@ class ProjectsController < ApplicationController
end
def housekeeping
- status = ::Projects::HousekeepingService.new(@project).execute
+ ::Projects::HousekeepingService.new(@project).execute
respond_to do |format|
- if status
- flash[:notice] = "Housekeeping finished successfully."
- else
- flash[:alert] = "Housekeeping failed."
- end
+ flash[:notice] = "Housekeeping successfully started."
format.html { redirect_to project_path(@project) }
end
end
diff --git a/app/services/projects/housekeeping_service.rb b/app/services/projects/housekeeping_service.rb
index bea91b5f180..0db85ac2142 100644
--- a/app/services/projects/housekeeping_service.rb
+++ b/app/services/projects/housekeeping_service.rb
@@ -14,7 +14,7 @@ module Projects
end
def execute
- gitlab_shell.gc(@project.path_with_namespace)
+ GitlabShellWorker.perform_async(:gc, @project.path_with_namespace)
end
end
end