Commit 1ce09b6e authored by Shinya Maeda's avatar Shinya Maeda

Introduce manage_cluster queue for sidekiq workers

parent 6b7889f7
class ClusterCreationWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
include ClusterQueue
def perform(cluster_id)
Gcp::Cluster.find_by_id(cluster_id).try do |cluster|
......
##
# 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
class WaitForClusterCreationWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
include ClusterQueue
INITIAL_INTERVAL = 2.minutes
EAGER_INTERVAL = 10.seconds
......
......@@ -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]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment