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
d3049d97
Commit
d3049d97
authored
Jul 29, 2020
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused methods from Geo::SelectiveSync
parent
074b5ccf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
27 deletions
+0
-27
ee/app/models/concerns/geo/selective_sync.rb
ee/app/models/concerns/geo/selective_sync.rb
+0
-24
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+0
-1
ee/app/models/geo/fdw/project.rb
ee/app/models/geo/fdw/project.rb
+0
-2
No files found.
ee/app/models/concerns/geo/selective_sync.rb
View file @
d3049d97
...
@@ -3,30 +3,6 @@
...
@@ -3,30 +3,6 @@
module
Geo::SelectiveSync
module
Geo::SelectiveSync
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
def
projects_outside_selected_namespaces
return
project_model
.
none
unless
selective_sync_by_namespaces?
cte_query
=
selected_namespaces_and_descendants_cte
cte_table
=
cte_query
.
table
join_statement
=
projects_table
.
join
(
cte_table
,
Arel
::
Nodes
::
OuterJoin
)
.
on
(
projects_table
[
:namespace_id
].
eq
(
cte_table
[
:id
]))
project_model
.
joins
(
join_statement
.
join_sources
)
.
where
(
cte_table
[
:id
].
eq
(
nil
))
.
with
.
recursive
(
cte_query
.
to_arel
)
end
def
projects_outside_selected_shards
return
project_model
.
none
unless
selective_sync_by_shards?
project_model
.
outside_shards
(
selective_sync_shards
)
end
def
selective_sync?
def
selective_sync?
selective_sync_type
.
present?
selective_sync_type
.
present?
end
end
...
...
ee/app/models/ee/project.rb
View file @
d3049d97
...
@@ -115,7 +115,6 @@ module EE
...
@@ -115,7 +115,6 @@ module EE
scope
:with_wiki_enabled
,
->
{
with_feature_enabled
(
:wiki
)
}
scope
:with_wiki_enabled
,
->
{
with_feature_enabled
(
:wiki
)
}
scope
:within_shards
,
->
(
shard_names
)
{
where
(
repository_storage:
Array
(
shard_names
))
}
scope
:within_shards
,
->
(
shard_names
)
{
where
(
repository_storage:
Array
(
shard_names
))
}
scope
:outside_shards
,
->
(
shard_names
)
{
where
.
not
(
repository_storage:
Array
(
shard_names
))
}
scope
:verification_failed_repos
,
->
{
joins
(
:repository_state
).
merge
(
ProjectRepositoryState
.
verification_failed_repos
)
}
scope
:verification_failed_repos
,
->
{
joins
(
:repository_state
).
merge
(
ProjectRepositoryState
.
verification_failed_repos
)
}
scope
:verification_failed_wikis
,
->
{
joins
(
:repository_state
).
merge
(
ProjectRepositoryState
.
verification_failed_wikis
)
}
scope
:verification_failed_wikis
,
->
{
joins
(
:repository_state
).
merge
(
ProjectRepositoryState
.
verification_failed_wikis
)
}
scope
:for_plan_name
,
->
(
name
)
{
joins
(
namespace:
{
gitlab_subscription: :hosted_plan
}).
where
(
plans:
{
name:
name
})
}
scope
:for_plan_name
,
->
(
name
)
{
joins
(
namespace:
{
gitlab_subscription: :hosted_plan
}).
where
(
plans:
{
name:
name
})
}
...
...
ee/app/models/geo/fdw/project.rb
View file @
d3049d97
...
@@ -13,8 +13,6 @@ module Geo
...
@@ -13,8 +13,6 @@ module Geo
belongs_to
:namespace
,
class_name:
'Geo::Fdw::Namespace'
belongs_to
:namespace
,
class_name:
'Geo::Fdw::Namespace'
scope
:outside_shards
,
->
(
shard_names
)
{
where
.
not
(
repository_storage:
Array
(
shard_names
))
}
alias_method
:parent
,
:namespace
alias_method
:parent
,
:namespace
delegate
:disk_path
,
to: :storage
delegate
:disk_path
,
to: :storage
...
...
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