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
8cf121e8
Commit
8cf121e8
authored
Jul 24, 2020
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push scopes out of find_registry_differences
And defer refactoring GeoNode#lfs_objects for a follow up.
parent
85632be2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
ee/app/finders/geo/file_registry_finder.rb
ee/app/finders/geo/file_registry_finder.rb
+1
-2
ee/app/finders/geo/lfs_object_registry_finder.rb
ee/app/finders/geo/lfs_object_registry_finder.rb
+3
-1
No files found.
ee/app/finders/geo/file_registry_finder.rb
View file @
8cf121e8
...
@@ -54,8 +54,7 @@ module Geo
...
@@ -54,8 +54,7 @@ module Geo
#
#
# @return [Array] the first element is an Array of untracked IDs, and the second element is an Array of tracked IDs that are unused
# @return [Array] the first element is an Array of untracked IDs, and the second element is an Array of tracked IDs that are unused
def
find_registry_differences
(
range
)
def
find_registry_differences
(
range
)
source
=
local_storage_only?
?
replicables
.
with_files_stored_locally
:
replicables
source_ids
=
replicables
.
id_in
(
range
).
pluck
(
replicable_primary_key
)
# rubocop:disable CodeReuse/ActiveRecord
source_ids
=
source
.
id_in
(
range
).
pluck
(
replicable_primary_key
)
# rubocop:disable CodeReuse/ActiveRecord
tracked_ids
=
syncable
.
pluck_model_ids_in_range
(
range
)
tracked_ids
=
syncable
.
pluck_model_ids_in_range
(
range
)
untracked_ids
=
source_ids
-
tracked_ids
untracked_ids
=
source_ids
-
tracked_ids
...
...
ee/app/finders/geo/lfs_object_registry_finder.rb
View file @
8cf121e8
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
module
Geo
module
Geo
class
LfsObjectRegistryFinder
<
FileRegistryFinder
class
LfsObjectRegistryFinder
<
FileRegistryFinder
def
replicables
def
replicables
current_node
(
fdw:
false
).
lfs_objects
lfs_objects
=
current_node
(
fdw:
false
).
lfs_objects
local_storage_only?
?
lfs_objects
.
with_files_stored_locally
:
lfs_objects
end
end
def
syncable
def
syncable
...
...
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