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
6ce2b6c9
Commit
6ce2b6c9
authored
Apr 16, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Obey Cop/AvoidReturnFromBlocks and Cop/AvoidBreakFromStrongMemoize
parent
e50d7588
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
11 deletions
+11
-11
ee/app/services/geo/base_sync_service.rb
ee/app/services/geo/base_sync_service.rb
+1
-1
ee/app/services/geo/file_registry_removal_service.rb
ee/app/services/geo/file_registry_removal_service.rb
+1
-1
ee/app/workers/geo/prune_event_log_worker.rb
ee/app/workers/geo/prune_event_log_worker.rb
+2
-2
ee/app/workers/geo/repositories_clean_up_worker.rb
ee/app/workers/geo/repositories_clean_up_worker.rb
+1
-1
ee/lib/api/project_mirror.rb
ee/lib/api/project_mirror.rb
+1
-1
ee/lib/ee/gitlab/checks/change_access.rb
ee/lib/ee/gitlab/checks/change_access.rb
+1
-1
ee/lib/gitlab/database/load_balancing/host_list.rb
ee/lib/gitlab/database/load_balancing/host_list.rb
+2
-2
ee/lib/system_check/geo/authorized_keys_check.rb
ee/lib/system_check/geo/authorized_keys_check.rb
+1
-1
lib/api/namespaces.rb
lib/api/namespaces.rb
+1
-1
No files found.
ee/app/services/geo/base_sync_service.rb
View file @
6ce2b6c9
...
@@ -35,7 +35,7 @@ module Geo
...
@@ -35,7 +35,7 @@ module Geo
# Clean up the state of sync to start a new cycle
# Clean up the state of sync to start a new cycle
registry
.
delete
registry
.
delete
log_info
(
"Clean up
#{
type
}
sync status"
)
log_info
(
"Clean up
#{
type
}
sync status"
)
return
break
end
end
log_info
(
"Finished
#{
type
}
sync"
)
log_info
(
"Finished
#{
type
}
sync"
)
...
...
ee/app/services/geo/file_registry_removal_service.rb
View file @
6ce2b6c9
...
@@ -12,7 +12,7 @@ module Geo
...
@@ -12,7 +12,7 @@ module Geo
unless
file_registry
unless
file_registry
log_error
(
'Could not find file_registry'
)
log_error
(
'Could not find file_registry'
)
return
break
end
end
if
File
.
exist?
(
file_path
)
if
File
.
exist?
(
file_path
)
...
...
ee/app/workers/geo/prune_event_log_worker.rb
View file @
6ce2b6c9
...
@@ -18,7 +18,7 @@ module Geo
...
@@ -18,7 +18,7 @@ module Geo
if
Gitlab
::
Geo
.
secondary_nodes
.
empty?
if
Gitlab
::
Geo
.
secondary_nodes
.
empty?
log_info
(
'No secondary nodes, delete all Geo Event Log entries'
)
log_info
(
'No secondary nodes, delete all Geo Event Log entries'
)
Geo
::
EventLog
.
delete_all
Geo
::
EventLog
.
delete_all
return
break
end
end
cursor_last_event_ids
=
Gitlab
::
Geo
.
secondary_nodes
.
map
do
|
node
|
cursor_last_event_ids
=
Gitlab
::
Geo
.
secondary_nodes
.
map
do
|
node
|
...
@@ -27,7 +27,7 @@ module Geo
...
@@ -27,7 +27,7 @@ module Geo
if
cursor_last_event_ids
.
include?
(
nil
)
if
cursor_last_event_ids
.
include?
(
nil
)
log_info
(
'Could not get status of all nodes, not deleting any entries from Geo Event Log'
,
unhealthy_node_count:
cursor_last_event_ids
.
count
(
nil
))
log_info
(
'Could not get status of all nodes, not deleting any entries from Geo Event Log'
,
unhealthy_node_count:
cursor_last_event_ids
.
count
(
nil
))
return
break
end
end
log_info
(
'Delete Geo Event Log entries up to id'
,
geo_event_log_id:
cursor_last_event_ids
.
min
)
log_info
(
'Delete Geo Event Log entries up to id'
,
geo_event_log_id:
cursor_last_event_ids
.
min
)
...
...
ee/app/workers/geo/repositories_clean_up_worker.rb
View file @
6ce2b6c9
...
@@ -12,7 +12,7 @@ module Geo
...
@@ -12,7 +12,7 @@ module Geo
# Prevent multiple Sidekiq workers from performing repositories clean up
# Prevent multiple Sidekiq workers from performing repositories clean up
try_obtain_lease
do
try_obtain_lease
do
geo_node
=
GeoNode
.
find
(
geo_node_id
)
geo_node
=
GeoNode
.
find
(
geo_node_id
)
return
unless
geo_node
.
selective_sync?
break
unless
geo_node
.
selective_sync?
Project
.
where
.
not
(
id:
geo_node
.
projects
).
find_in_batches
(
batch_size:
BATCH_SIZE
)
do
|
batch
|
Project
.
where
.
not
(
id:
geo_node
.
projects
).
find_in_batches
(
batch_size:
BATCH_SIZE
)
do
|
batch
|
batch
.
each
do
|
project
|
batch
.
each
do
|
project
|
...
...
ee/lib/api/project_mirror.rb
View file @
6ce2b6c9
...
@@ -49,7 +49,7 @@ module API
...
@@ -49,7 +49,7 @@ module API
post
":id/mirror/pull"
do
post
":id/mirror/pull"
do
authenticate_with_webhook_token!
authenticate_with_webhook_token!
return
render_api_error!
(
'The project is not mirrored'
,
400
)
unless
project
.
mirror?
break
render_api_error!
(
'The project is not mirrored'
,
400
)
unless
project
.
mirror?
project
.
force_import_job!
project
.
force_import_job!
...
...
ee/lib/ee/gitlab/checks/change_access.rb
View file @
6ce2b6c9
...
@@ -48,7 +48,7 @@ module EE
...
@@ -48,7 +48,7 @@ module EE
def
changes
def
changes
strong_memoize
(
:changes
)
do
strong_memoize
(
:changes
)
do
return
[]
unless
newrev
next
[]
unless
newrev
project
.
repository
.
raw_changes_between
(
oldrev
,
newrev
)
project
.
repository
.
raw_changes_between
(
oldrev
,
newrev
)
end
end
...
...
ee/lib/gitlab/database/load_balancing/host_list.rb
View file @
6ce2b6c9
...
@@ -28,11 +28,11 @@ module Gitlab
...
@@ -28,11 +28,11 @@ module Gitlab
host
=
@hosts
[
@index
]
host
=
@hosts
[
@index
]
@index
=
(
@index
+
1
)
%
@hosts
.
length
@index
=
(
@index
+
1
)
%
@hosts
.
length
return
host
if
host
.
online?
break
host
if
host
.
online?
# Return nil once we have cycled through all hosts and none were
# Return nil once we have cycled through all hosts and none were
# available.
# available.
return
if
@index
==
started_at
break
if
@index
==
started_at
end
end
end
end
end
end
...
...
ee/lib/system_check/geo/authorized_keys_check.rb
View file @
6ce2b6c9
...
@@ -194,7 +194,7 @@ module SystemCheck
...
@@ -194,7 +194,7 @@ module SystemCheck
if
(
match
=
line
.
match
(
regexp
))
if
(
match
=
line
.
match
(
regexp
))
raw_content
=
match
[
:content
]
raw_content
=
match
[
:content
]
# remove linebreak, and lead and trailing spaces
# remove linebreak, and lead and trailing spaces
return
raw_content
.
chomp
.
strip
return
raw_content
.
chomp
.
strip
# rubocop:disable Cop/AvoidReturnFromBlocks
end
end
end
end
end
end
...
...
lib/api/namespaces.rb
View file @
6ce2b6c9
...
@@ -32,7 +32,7 @@ module API
...
@@ -32,7 +32,7 @@ module API
namespace
=
find_namespace
(
params
[
:id
])
namespace
=
find_namespace
(
params
[
:id
])
return
not_found!
(
'Namespace'
)
unless
namespace
break
not_found!
(
'Namespace'
)
unless
namespace
if
namespace
.
update
(
declared_params
)
if
namespace
.
update
(
declared_params
)
present
namespace
,
with:
Entities
::
Namespace
,
current_user:
current_user
present
namespace
,
with:
Entities
::
Namespace
,
current_user:
current_user
...
...
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