diff --git a/config/queue.yml b/config/queue.yml index 9eace59c41e6..1f095e8e1a16 100644 --- a/config/queue.yml +++ b/config/queue.yml @@ -3,10 +3,26 @@ default: &default - polling_interval: 1 batch_size: 500 workers: - - queues: "*" + - queues: + - default + - mailers + - clock + - providers + - billing + - webhook + - invoices + - integrations threads: 3 processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> polling_interval: 0.1 + - queues: "wallets" + threads: 3 + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> + polling_interval: 3 + - queues: "low_priority" + threads: 1 + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> + polling_interval: 3 development: <<: *default diff --git a/config/queue_events.yml b/config/queue_events.yml new file mode 100644 index 000000000000..1d25db24396f --- /dev/null +++ b/config/queue_events.yml @@ -0,0 +1,18 @@ +default: &default + dispatchers: + - polling_interval: 1 + batch_size: 500 + workers: + - queues: "events" + threads: 3 + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> + polling_interval: 0.1 + +development: + <<: *default + +test: + <<: *default + +production: + <<: *default diff --git a/config/queue_pdfs.yml b/config/queue_pdfs.yml new file mode 100644 index 000000000000..9a69c3ad6f83 --- /dev/null +++ b/config/queue_pdfs.yml @@ -0,0 +1,18 @@ +default: &default + dispatchers: + - polling_interval: 1 + batch_size: 500 + workers: + - queues: "pdfs" + threads: 3 + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> + polling_interval: 3 + +development: + <<: *default + +test: + <<: *default + +production: + <<: *default diff --git a/scripts/start.events.worker.dev.sh b/scripts/start.events.worker.dev.sh index 7bd0c93aad95..e9f82f34b9de 100755 --- a/scripts/start.events.worker.dev.sh +++ b/scripts/start.events.worker.dev.sh @@ -1,4 +1,4 @@ #!/bin/bash bundle install -bundle exec sidekiq -C config/sidekiq_events.yml +bin/jobs -c config/queue_events.yml diff --git a/scripts/start.pdfs.worker.dev.sh b/scripts/start.pdfs.worker.dev.sh index ccef433c47d6..9dfbb74c61cf 100755 --- a/scripts/start.pdfs.worker.dev.sh +++ b/scripts/start.pdfs.worker.dev.sh @@ -1,4 +1,4 @@ #!/bin/bash bundle install -bundle exec sidekiq -C config/sidekiq_pdfs.yml +bin/jobs -c config/queue_pdfs.yml diff --git a/scripts/start.worker.dev.sh b/scripts/start.worker.dev.sh index ae6e691a469c..fb826edc3b17 100755 --- a/scripts/start.worker.dev.sh +++ b/scripts/start.worker.dev.sh @@ -1,6 +1,5 @@ #!/bin/bash bundle install -#bundle exec sidekiq -C config/sidekiq.yml -bundle exec rake solid_queue:start +bin/jobs -c config/queue.yml