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
475873d2
Commit
475873d2
authored
Jan 12, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Geo::RepositoriesCleanUpWorker to work with hashed storage
parent
06215a1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ee/app/workers/geo/repositories_clean_up_worker.rb
ee/app/workers/geo/repositories_clean_up_worker.rb
+3
-3
spec/ee/spec/workers/geo/repositories_clean_up_worker_spec.rb
.../ee/spec/workers/geo/repositories_clean_up_worker_spec.rb
+2
-2
No files found.
ee/app/workers/geo/repositories_clean_up_worker.rb
View file @
475873d2
...
...
@@ -30,12 +30,12 @@ module Geo
# 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
.
disk_path
,
project
.
repository
.
storage
)
if
job_id
log_info
(
'Repository cleaned up'
,
project_id:
project
.
id
,
full_path:
project
.
full
_path
,
job_id:
job_id
)
log_info
(
'Repository cleaned up'
,
project_id:
project
.
id
,
disk_path:
project
.
disk
_path
,
job_id:
job_id
)
else
log_error
(
'Could not clean up repository'
,
project_id:
project
.
id
,
full_path:
project
.
full
_path
)
log_error
(
'Could not clean up repository'
,
project_id:
project
.
id
,
disk_path:
project
.
disk
_path
)
end
end
...
...
spec/ee/spec/workers/geo/repositories_clean_up_worker_spec.rb
View file @
475873d2
...
...
@@ -17,11 +17,11 @@ describe Geo::RepositoriesCleanUpWorker do
unsynced_project
=
create
(
:project
,
:repository
)
expect
(
GeoRepositoryDestroyWorker
).
to
receive
(
:perform_async
)
.
with
(
unsynced_project
.
id
,
unsynced_project
.
name
,
unsynced_project
.
full_path
)
.
with
(
unsynced_project
.
id
,
unsynced_project
.
name
,
unsynced_project
.
disk_path
,
unsynced_project
.
repository
.
storage
)
.
once
.
and_return
(
1
)
expect
(
GeoRepositoryDestroyWorker
).
not_to
receive
(
:perform_async
)
.
with
(
project_in_synced_group
.
id
,
project_in_synced_group
.
name
,
project_in_synced_group
.
full_path
)
.
with
(
project_in_synced_group
.
id
,
project_in_synced_group
.
name
,
project_in_synced_group
.
disk_path
,
project_in_synced_group
.
repository
.
storage
)
subject
.
perform
(
geo_node
.
id
)
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