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
8d4b38e2
Commit
8d4b38e2
authored
Jun 27, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename method to #each_eligible_shard
parent
a0ef89e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/workers/concerns/each_shard_worker.rb
app/workers/concerns/each_shard_worker.rb
+1
-1
app/workers/repository_check/dispatch_worker.rb
app/workers/repository_check/dispatch_worker.rb
+1
-1
ee/app/workers/geo/scheduler/per_shard_scheduler_worker.rb
ee/app/workers/geo/scheduler/per_shard_scheduler_worker.rb
+1
-1
No files found.
app/workers/concerns/each_shard_worker.rb
View file @
8d4b38e2
...
@@ -6,7 +6,7 @@ module EachShardWorker
...
@@ -6,7 +6,7 @@ module EachShardWorker
Gitlab
::
HealthChecks
::
GitalyCheck
Gitlab
::
HealthChecks
::
GitalyCheck
].
freeze
].
freeze
def
each_shard
def
each_
eligible_
shard
Gitlab
::
ShardHealthCache
.
update
(
eligible_shard_names
)
Gitlab
::
ShardHealthCache
.
update
(
eligible_shard_names
)
eligible_shard_names
.
each
do
|
shard_name
|
eligible_shard_names
.
each
do
|
shard_name
|
...
...
app/workers/repository_check/dispatch_worker.rb
View file @
8d4b38e2
...
@@ -7,7 +7,7 @@ module RepositoryCheck
...
@@ -7,7 +7,7 @@ module RepositoryCheck
def
perform
def
perform
return
unless
Gitlab
::
CurrentSettings
.
repository_checks_enabled
return
unless
Gitlab
::
CurrentSettings
.
repository_checks_enabled
each_shard
do
|
shard_name
|
each_
eligible_
shard
do
|
shard_name
|
RepositoryCheck
::
BatchWorker
.
perform_async
(
shard_name
)
RepositoryCheck
::
BatchWorker
.
perform_async
(
shard_name
)
end
end
end
end
...
...
ee/app/workers/geo/scheduler/per_shard_scheduler_worker.rb
View file @
8d4b38e2
...
@@ -7,7 +7,7 @@ module Geo
...
@@ -7,7 +7,7 @@ module Geo
include
::
EachShardWorker
include
::
EachShardWorker
def
perform
def
perform
each_shard
{
|
shard_name
|
schedule_job
(
shard_name
)
}
each_
eligible_
shard
{
|
shard_name
|
schedule_job
(
shard_name
)
}
end
end
def
schedule_job
(
shard_name
)
def
schedule_job
(
shard_name
)
...
...
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