Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d4690af8
Commit
d4690af8
authored
Nov 19, 2015
by
Jeroen Nijhof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GitlabShellWorker.perform_async for housekeeping
parent
839aae0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+2
-6
app/services/projects/housekeeping_service.rb
app/services/projects/housekeeping_service.rb
+1
-1
No files found.
app/controllers/projects_controller.rb
View file @
d4690af8
...
...
@@ -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
...
...
app/services/projects/housekeeping_service.rb
View file @
d4690af8
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment