BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1ce09b6e
Commit
1ce09b6e
authored
Oct 04, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce manage_cluster queue for sidekiq workers
parent
6b7889f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
cluster_creation_worker.rb
app/workers/cluster_creation_worker.rb
+1
-1
cluster_queue.rb
app/workers/concerns/cluster_queue.rb
+10
-0
wait_for_cluster_creation_worker.rb
app/workers/wait_for_cluster_creation_worker.rb
+1
-1
sidekiq_queues.yml
config/sidekiq_queues.yml
+1
-2
No files found.
app/workers/cluster_creation_worker.rb
View file @
1ce09b6e
class
ClusterCreationWorker
include
Sidekiq
::
Worker
include
DedicatedSidekiq
Queue
include
Cluster
Queue
def
perform
(
cluster_id
)
Gcp
::
Cluster
.
find_by_id
(
cluster_id
).
try
do
|
cluster
|
...
...
app/workers/concerns/cluster_queue.rb
0 → 100644
View file @
1ce09b6e
##
# Concern for setting Sidekiq settings for the various Gcp clusters workers.
#
module
ClusterQueue
extend
ActiveSupport
::
Concern
included
do
sidekiq_options
queue: :manage_cluster
end
end
app/workers/wait_for_cluster_creation_worker.rb
View file @
1ce09b6e
class
WaitForClusterCreationWorker
include
Sidekiq
::
Worker
include
DedicatedSidekiq
Queue
include
Cluster
Queue
INITIAL_INTERVAL
=
2
.
minutes
EAGER_INTERVAL
=
10
.
seconds
...
...
config/sidekiq_queues.yml
View file @
1ce09b6e
...
...
@@ -62,5 +62,4 @@
-
[
update_user_activity
,
1
]
-
[
propagate_service_template
,
1
]
-
[
background_migration
,
1
]
-
[
cluster_creation
,
1
]
-
[
wait_for_cluster_creation
,
1
]
-
[
manage_cluster
,
1
]
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