From bccf87b0784a08a1210b2da8935944c65b66dee1 Mon Sep 17 00:00:00 2001 From: Justin Marsh Date: Tue, 6 Feb 2024 16:32:58 +0100 Subject: [PATCH 1/3] initial commit for silence_logging --- lib/solid_queue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/solid_queue.rb b/lib/solid_queue.rb index 69243e84..27a294d2 100644 --- a/lib/solid_queue.rb +++ b/lib/solid_queue.rb @@ -33,7 +33,7 @@ module SolidQueue mattr_accessor :shutdown_timeout, default: 5.seconds - mattr_accessor :silence_polling, default: false + mattr_accessor :silence_polling, default: true mattr_accessor :supervisor_pidfile mattr_accessor :supervisor, default: false From 7c5a5417ca3942186a1e66fa5cf93f4a0ed5351e Mon Sep 17 00:00:00 2001 From: Justin Marsh Date: Tue, 13 Feb 2024 10:47:19 +0100 Subject: [PATCH 2/3] update readme with new default --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b1d455a2..dd59d82a 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ There are several settings that control how Solid Queue works that you can set a - `process_heartbeat_interval`: the heartbeat interval that all processes will follow—defaults to to 60 seconds. - `process_alive_threshold`: how long to wait until a process is considered dead after its last heartbeat—defaults to to 5 minutes. - `shutdown_timeout`: time the supervisor will wait since it sent the `TERM` signal to its supervised processes before sending a `QUIT` version to them requesting immediate termination—defaults to to 5 seconds. -- `silence_polling`: whether to silence Active Record logs emitted when polling for both workers and dispatchers—defaults to to `false`. +- `silence_polling`: whether to silence Active Record logs emitted when polling for both workers and dispatchers—defaults to to `true`. - `supervisor_pidfile`: path to a pidfile that the supervisor will create when booting to prevent running more than one supervisor in the same host, or in case you want to use it for a health check. It's `nil` by default. - `preserve_finished_jobs`: whether to keep finished jobs in the `solid_queue_jobs` table—defaults to to `true`. - `clear_finished_jobs_after`: period to keep finished jobs around, in case `preserve_finished_jobs` is true—defaults to to 1 day. **Note:** Right now, there's no automatic cleanup of finished jobs. You'd need to do this by periodically invoking `SolidQueue::Job.clear_finished_in_batches`, but this will happen automatically in the near future. From b572b1b5e19c522d4c3458c4b44d495903c48ac9 Mon Sep 17 00:00:00 2001 From: Justin Marsh Date: Tue, 13 Feb 2024 10:51:22 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0b7f4250..4d08207b 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ There are several settings that control how Solid Queue works that you can set a - `clear_finished_jobs_after`: period to keep finished jobs around, in case `preserve_finished_jobs` is true—defaults to 1 day. **Note:** Right now, there's no automatic cleanup of finished jobs. You'd need to do this by periodically invoking `SolidQueue::Job.clear_finished_in_batches`, but this will happen automatically in the near future. - `default_concurrency_control_period`: the value to be used as the default for the `duration` parameter in [concurrency controls](#concurrency-controls). It defaults to 3 minutes. + ## Concurrency controls Solid Queue extends Active Job with concurrency controls, that allows you to limit how many jobs of a certain type or with certain arguments can run at the same time. When limited in this way, jobs will be blocked from running, and they'll stay blocked until another job finishes and unblocks them, or after the set expiry time (concurrency limit's _duration_) elapses. Jobs are never discarded or lost, only blocked.