Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in
Toggle navigation
Menu
Open sidebar
gitlab-org
build
CNG
Commits
ad5b66fd
Unverified
Commit
ad5b66fd
authored
May 27, 2021
by
DJ Mountney
Browse files
Use only sidekiq cluster
And remove support for running without cluster
parent
9f597805
Changes
1
Show whitespace changes
Inline
Side-by-side
gitlab-sidekiq/scripts/process-wrapper
View file @
ad5b66fd
...
...
@@ -14,38 +14,37 @@ else
fi
fi
if
[[
"
${
SIDEKIQ_CLUSTER
^^
}
"
=
'TRUE'
]]
;
then
if
[
-n
"
${
SIDEKIQ_NEGATE_QUEUES
}
"
]
;
then
if
[
-n
"
${
SIDEKIQ_NEGATE_QUEUES
}
"
]
;
then
queues
=
"
${
SIDEKIQ_NEGATE_QUEUES
}
"
negate_flag
=
'--negate'
else
else
queues
=
"
${
SIDEKIQ_QUEUES
:-
*
}
"
negate_flag
=
''
fi
fi
# 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
# 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
queue_selector_flag
=
'--queue-selector'
else
else
queue_selector_flag
=
''
fi
fi
# sidekiq-cluster offers two things:
#
# 1. The ability to run and supervise multiple Sidekiq processes,
# potentially listening to different queues.
# 2. Enhanced queue pre-processing, including the ability to negate
# a set of queues and the experimental query selector.
#
# 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
# only need the second item, we use the `--dryrun` option to
# sidekiq-cluster to get the command line it would execute, and then
# execute that command directly.
#
# See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297
#
/srv/gitlab/bin/
$(
# sidekiq-cluster offers two things:
#
# 1. The ability to run and supervise multiple Sidekiq processes,
# potentially listening to different queues.
# 2. Enhanced queue pre-processing, including the ability to negate
# a set of queues and the experimental query selector.
#
# 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
# only need the second item, we use the `--dryrun` option to
# sidekiq-cluster to get the command line it would execute, and then
# execute that command directly.
#
# See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297
#
/srv/gitlab/bin/
$(
/srv/gitlab/bin/sidekiq-cluster
\
--dryrun
\
-r
/srv/gitlab
\
...
...
@@ -57,11 +56,3 @@ if [[ "${SIDEKIQ_CLUSTER^^}" = 'TRUE' ]]; then
$negate_flag
\
"
${
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
Write
Preview
Supports
Markdown
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