-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use templates and config maps to get the settings for sidekiq the way we want #976
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to make a follow up PR replacing the remaining "auxiliary" with "aux", but I don't think that's blocking for this PR
extraEnvVars: *envVars | ||
extraEnvFrom: | ||
- configMapRef: | ||
name: auxilary-worker-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't put this back into pals yet, but in adventist we established this pattern:
- Use "aux" instead of "auxiliary"
- Put "worker" before "aux"
name: auxilary-worker-env | |
name: worker-aux-env |
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: auxiliary-worker-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: auxiliary-worker-env | |
name: worker-aux-env |
extraEnvVars: *envVars | ||
extraEnvFrom: | ||
- configMapRef: | ||
name: auxilary-worker-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: auxilary-worker-env | |
name: worker-aux-env |
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: auxiliary-worker-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: auxiliary-worker-env | |
name: worker-aux-env |
@@ -4,13 +4,9 @@ if ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'] && !ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE | |||
end | |||
|
|||
if ENV['DATABASE_URL'] && !ENV['DATABASE_URL'].empty? | |||
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', 'pool=30') | |||
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', "pools=#{ENV.fetch('WORKER_CONCURENCY'), 30}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', "pools=#{ENV.fetch('WORKER_CONCURENCY'), 30}") | |
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', "pools=#{ENV.fetch('WORKER_CONCURRENCY'), 30}") |
else | ||
exec "echo $DATABASE_URL && bundle exec sidekiq" | ||
end | ||
exec "echo $DATABASE_URL && RAILS_MAX_THREADS=$WORKER_CONCURENCY bundle exec sidekiq $WORKER_ARGS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exec "echo $DATABASE_URL && RAILS_MAX_THREADS=$WORKER_CONCURENCY bundle exec sidekiq $WORKER_ARGS" | |
exec "echo $DATABASE_URL && RAILS_MAX_THREADS=$WORKER_CONCURRENCY bundle exec sidekiq $WORKER_ARGS" |
labels: | ||
{{- include "hyrax.labels" . | nindent 4 }} | ||
data: | ||
WORKER_CONCURENCY: "5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WORKER_CONCURENCY: "5" | |
WORKER_CONCURRENCY: "5" |
labels: | ||
{{- include "hyrax.labels" . | nindent 4 }} | ||
data: | ||
WORKER_CONCURENCY: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WORKER_CONCURENCY: "1" | |
WORKER_CONCURRENCY: "1" |
labels: | ||
{{- include "hyrax.labels" . | nindent 4 }} | ||
data: | ||
WORKER_CONCURENCY: "5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WORKER_CONCURENCY: "5" | |
WORKER_CONCURRENCY: "5" |
labels: | ||
{{- include "hyrax.labels" . | nindent 4 }} | ||
data: | ||
WORKER_CONCURENCY: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WORKER_CONCURENCY: "1" | |
WORKER_CONCURRENCY: "1" |
This is simply an alternative approach to the existing way of getting the aux worker configured properly. Trying to find the best pattern.