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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ea54570a
Commit
ea54570a
authored
Aug 09, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if project repository exists before scheduling removal
parent
389dce86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
app/workers/geo/repositories_clean_up_worker.rb
app/workers/geo/repositories_clean_up_worker.rb
+4
-0
No files found.
app/workers/geo/repositories_clean_up_worker.rb
View file @
ea54570a
...
@@ -2,6 +2,7 @@ module Geo
...
@@ -2,6 +2,7 @@ module Geo
class
RepositoriesCleanUpWorker
class
RepositoriesCleanUpWorker
include
Sidekiq
::
Worker
include
Sidekiq
::
Worker
include
GeoQueue
include
GeoQueue
include
Gitlab
::
ShellAdapter
BATCH_SIZE
=
250
BATCH_SIZE
=
250
LEASE_TIMEOUT
=
60
.
minutes
LEASE_TIMEOUT
=
60
.
minutes
...
@@ -27,6 +28,9 @@ module Geo
...
@@ -27,6 +28,9 @@ module Geo
private
private
def
clean_up_repositories
(
project
)
def
clean_up_repositories
(
project
)
# There is a possibility project does not have repository or wiki
return
true
unless
gitlab_shell
.
exists?
(
project
.
repository_storage_path
,
"
#{
project
.
disk_path
}
.git"
)
job_id
=
::
GeoRepositoryDestroyWorker
.
perform_async
(
project
.
id
,
project
.
name
,
project
.
full_path
)
job_id
=
::
GeoRepositoryDestroyWorker
.
perform_async
(
project
.
id
,
project
.
name
,
project
.
full_path
)
if
job_id
if
job_id
...
...
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