From 526e28d93541922c6d971359c3f2154794d1f72c Mon Sep 17 00:00:00 2001 From: Waffles Date: Mon, 26 Dec 2022 22:41:35 -0800 Subject: [PATCH] Change how sidekiq queues are defined --- README.md | 9 ++++----- roles/sidekiq/templates/docker-compose.override.yml.j2 | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 47730e2..052d622 100644 --- a/README.md +++ b/README.md @@ -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 -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: - - name: ingress-and-stuff - - q: [ '-q', 'ingress', '-q', 'default' ] +sidekiq: + - name: ingress-and-stuff + - q: [ 'ingress', '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. diff --git a/roles/sidekiq/templates/docker-compose.override.yml.j2 b/roles/sidekiq/templates/docker-compose.override.yml.j2 index b014b62..3e27831 100644 --- a/roles/sidekiq/templates/docker-compose.override.yml.j2 +++ b/roles/sidekiq/templates/docker-compose.override.yml.j2 @@ -5,7 +5,7 @@ services: restart: always env_file: .env.production {% 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 %} command: bundle exec sidekiq {% endif %}