Change how sidekiq queues are defined

This commit is contained in:
Waffles
2022-12-26 22:41:35 -08:00
parent 474aebea81
commit 526e28d935
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -63,13 +63,12 @@ The `docker-compose.yml` file is managed by the `mastodon` role, and will simply
### Configuring how many sidekiq workers and which queues they'll process ### Configuring how many sidekiq workers and which queues they'll process
Edit the `sidekiq.yml` file and configure the `sidekiq` var. The expected format is: Edit the `host_vars/$hostname` (where `$hostname` is a name of a host that is going to run sidekiq) file and configure the `sidekiq` var. The expected format is:
``` ```
vars: sidekiq:
sidekiq: - name: ingress-and-stuff
- name: ingress-and-stuff - q: [ 'ingress', 'default' ]
- q: [ '-q', 'ingress', '-q', 'default' ]
``` ```
This will create a service called `sidekiq-ingress-and-stuff` with the `ingress` and `default` queues. To have the default queues, leave the `q` array empty. This will create a service called `sidekiq-ingress-and-stuff` with the `ingress` and `default` queues. To have the default queues, leave the `q` array empty.
@@ -5,7 +5,7 @@ services:
restart: always restart: always
env_file: .env.production env_file: .env.production
{% if 'q' in SK %} {% if 'q' in SK %}
command: bundle exec sidekiq {{ SK['q'] | join(' ') }} -c 10 command: bundle exec sidekiq -q {{ SK['q'] | join(' -q ') }} -c 10
{% else %} {% else %}
command: bundle exec sidekiq command: bundle exec sidekiq
{% endif %} {% endif %}