Commit f827d6ba authored by Grzegorz Bizon's avatar Grzegorz Bizon

Clarify intention of sticking runner to primary database

parent 45aef69c
......@@ -6,9 +6,13 @@ module EE
extend ActiveSupport::Concern
def tick_runner_queue
unless Feature.enabled?(:ci_runner_builds_queue_on_replicas, runner, default_enabled: :yaml)
::Gitlab::Database::LoadBalancing::Sticking.stick(:runner, id)
end
##
# We only stick a runner to primary database to be able to detect the
# replication lag in `EE::Ci::RegisterJobService#execute`. The
# intention here is not execute `Ci::RegisterJobService#execute` on the
# primary database.
#
::Gitlab::Database::LoadBalancing::Sticking.stick(:runner, id)
super
end
......
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