Unverified Commit ad5b66fd authored by DJ Mountney's avatar DJ Mountney
Browse files

Use only sidekiq cluster

And remove support for running without cluster
parent 9f597805
...@@ -14,38 +14,37 @@ else ...@@ -14,38 +14,37 @@ else
fi fi
fi fi
if [[ "${SIDEKIQ_CLUSTER^^}" = 'TRUE' ]]; then if [ -n "${SIDEKIQ_NEGATE_QUEUES}" ]; then
if [ -n "${SIDEKIQ_NEGATE_QUEUES}" ]; then
queues="${SIDEKIQ_NEGATE_QUEUES}" queues="${SIDEKIQ_NEGATE_QUEUES}"
negate_flag='--negate' negate_flag='--negate'
else else
queues="${SIDEKIQ_QUEUES:-*}" queues="${SIDEKIQ_QUEUES:-*}"
negate_flag='' negate_flag=''
fi fi
# Remove experimental part in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/646 # Remove experimental part in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/646
if [[ "${SIDEKIQ_QUEUE_SELECTOR}" = 'true' || "${SIDEKIQ_EXPERIMENTAL_QUEUE_SELECTOR}" = 'true' ]]; then if [[ "${SIDEKIQ_QUEUE_SELECTOR}" = 'true' || "${SIDEKIQ_EXPERIMENTAL_QUEUE_SELECTOR}" = 'true' ]]; then
queue_selector_flag='--queue-selector' queue_selector_flag='--queue-selector'
else else
queue_selector_flag='' queue_selector_flag=''
fi fi
# sidekiq-cluster offers two things: # sidekiq-cluster offers two things:
# #
# 1. The ability to run and supervise multiple Sidekiq processes, # 1. The ability to run and supervise multiple Sidekiq processes,
# potentially listening to different queues. # potentially listening to different queues.
# 2. Enhanced queue pre-processing, including the ability to negate # 2. Enhanced queue pre-processing, including the ability to negate
# a set of queues and the experimental query selector. # a set of queues and the experimental query selector.
# #
# In this case, we do not want to start multiple Sidekiq processes # In this case, we do not want to start multiple Sidekiq processes
# inside a single pod - for that, we'd run additional pods. As we # inside a single pod - for that, we'd run additional pods. As we
# only need the second item, we use the `--dryrun` option to # only need the second item, we use the `--dryrun` option to
# sidekiq-cluster to get the command line it would execute, and then # sidekiq-cluster to get the command line it would execute, and then
# execute that command directly. # execute that command directly.
# #
# See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297 # See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297
# #
/srv/gitlab/bin/$( /srv/gitlab/bin/$(
/srv/gitlab/bin/sidekiq-cluster \ /srv/gitlab/bin/sidekiq-cluster \
--dryrun \ --dryrun \
-r /srv/gitlab \ -r /srv/gitlab \
...@@ -57,11 +56,3 @@ if [[ "${SIDEKIQ_CLUSTER^^}" = 'TRUE' ]]; then ...@@ -57,11 +56,3 @@ if [[ "${SIDEKIQ_CLUSTER^^}" = 'TRUE' ]]; then
$negate_flag \ $negate_flag \
"${queues}" "${queues}"
) )
else
/srv/gitlab/bin/bundle exec sidekiq \
-r /srv/gitlab \
-e production \
-c $SIDEKIQ_CONCURRENCY \
-t $SIDEKIQ_TIMEOUT \
-C /srv/gitlab/config/sidekiq_queues.yml
fi
Supports Markdown
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