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
7a574e5a
Commit
7a574e5a
authored
Sep 04, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Rubocop happy
parent
88d0560e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
ee/app/workers/concerns/geo/secondary/backfill_worker.rb
ee/app/workers/concerns/geo/secondary/backfill_worker.rb
+2
-0
ee/app/workers/geo/secondary/repository_backfill_worker.rb
ee/app/workers/geo/secondary/repository_backfill_worker.rb
+3
-3
No files found.
ee/app/workers/concerns/geo/secondary/backfill_worker.rb
View file @
7a574e5a
...
@@ -37,6 +37,7 @@ module Geo
...
@@ -37,6 +37,7 @@ module Geo
@loops
=
0
@loops
=
0
end
end
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def
perform
(
shard_name
)
def
perform
(
shard_name
)
@shard_name
=
shard_name
@shard_name
=
shard_name
@start_time
=
Time
.
now
.
utc
@start_time
=
Time
.
now
.
utc
...
@@ -47,6 +48,7 @@ module Geo
...
@@ -47,6 +48,7 @@ module Geo
schedule_jobs
schedule_jobs
end
end
end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
private
private
...
...
ee/app/workers/geo/secondary/repository_backfill_worker.rb
View file @
7a574e5a
...
@@ -48,7 +48,9 @@ module Geo
...
@@ -48,7 +48,9 @@ module Geo
update_jobs_in_progress
update_jobs_in_progress
unless
over_capacity?
if
over_capacity?
sleep
(
1
)
else
# This will stream the results one by one
# This will stream the results one by one
# until there are no more results to fetch.
# until there are no more results to fetch.
result
=
connection
.
get_result
result
=
connection
.
get_result
...
@@ -58,8 +60,6 @@ module Geo
...
@@ -58,8 +60,6 @@ module Geo
result
.
each
do
|
row
|
result
.
each
do
|
row
|
schedule_job
(
row
[
'id'
])
schedule_job
(
row
[
'id'
])
end
end
else
sleep
(
1
)
end
end
end
end
rescue
=>
error
rescue
=>
error
...
...
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