You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Solid Queue
2
2
3
-
Solid Queue is a DB-based queuing backend for [Active Job](https://edgeguides.rubyonrails.org/active_job_basics.html), designed with simplicity and performance in mind.
3
+
Solid Queue is a database-based queuing backend for [Active Job](https://edgeguides.rubyonrails.org/active_job_basics.html), designed with simplicity and performance in mind.
4
4
5
-
Besides regular job enqueuing and processing, Solid Queue supports delayed jobs, concurrency controls, recurring jobs, pausing queues, numeric priorities per job, priorities by queue order, and bulk enqueuing (`enqueue_all` for Active Job's `perform_all_later`).
5
+
In addition to regular job enqueuing and processing, Solid Queue supports delayed jobs, concurrency controls, recurring jobs, pausing queues, numeric priorities per job, priorities by queue order, and bulk enqueuing (`enqueue_all` for Active Job's `perform_all_later`).
6
6
7
-
Solid Queue can be used with SQL databases such as MySQL, PostgreSQL or SQLite, and it leverages the `FOR UPDATE SKIP LOCKED` clause, if available, to avoid blocking and waiting on locks when polling jobs. It relies on Active Job for retries, discarding, error handling, serialization, or delays, and it's compatible with Ruby on Rails's multi-threading.
7
+
Solid Queue can be used with SQL databases such as MySQL, PostgreSQL, or SQLite, and it leverages the `FOR UPDATE SKIP LOCKED` clause, if available, to avoid blocking and waiting on locks when polling jobs. It relies on Active Job for retries, discarding, error handling, serialization, and delays, and it's compatible with Ruby on Rails's multi-threading.
8
8
9
-
## Table of contents
9
+
## Table of Contents
10
10
11
11
-[Installation](#installation)
12
12
-[Usage in development and other non-production environments](#usage-in-development-and-other-non-production-environments)
@@ -15,10 +15,10 @@ Solid Queue can be used with SQL databases such as MySQL, PostgreSQL or SQLite,
@@ -36,7 +36,7 @@ Solid Queue can be used with SQL databases such as MySQL, PostgreSQL or SQLite,
36
36
37
37
## Installation
38
38
39
-
Solid Queue is configured by default in new Rails 8 applications. But if you're running an earlier version, you can add it manually following these steps:
39
+
Solid Queue is configured by default in new Rails 8 applications. If you're running an earlier version, you can add it manually following these steps:
40
40
41
41
1.`bundle add solid_queue`
42
42
2.`bin/rails solid_queue:install`
@@ -45,7 +45,7 @@ Solid Queue is configured by default in new Rails 8 applications. But if you're
45
45
46
46
This will configure Solid Queue as the production Active Job backend, create the configuration files `config/queue.yml` and `config/recurring.yml`, and create the `db/queue_schema.rb`. It'll also create a `bin/jobs` executable wrapper that you can use to start Solid Queue.
47
47
48
-
Once you've done that, you will then have to add the configuration for the queue database in `config/database.yml`. If you're using SQLite, it'll look like this:
48
+
Once you've done that, you will have to add the configuration for the queue database in `config/database.yml`. If you're using SQLite, it'll look like this:
49
49
50
50
```yaml
51
51
production:
@@ -79,7 +79,7 @@ Now you're ready to start processing jobs by running `bin/jobs` on the server th
79
79
80
80
For small projects, you can run Solid Queue on the same machine as your webserver. When you're ready to scale, Solid Queue supports horizontal scaling out-of-the-box. You can run Solid Queue on a separate server from your webserver, or even run `bin/jobs` on multiple machines at the same time. Depending on the configuration, you can designate some machines to run only dispatchers or only workers. See the [configuration](#configuration) section for more details on this.
81
81
82
-
**Note**: future changes to the schema will come in the form of regular migrations.
82
+
**Note**: Future changes to the schema will come in the form of regular migrations.
83
83
84
84
### Usage in development and other non-production environments
85
85
@@ -150,15 +150,15 @@ development:
150
150
151
151
### Single database configuration
152
152
153
-
Running Solid Queue in a separate database is recommended, but it's also possible to use one single database for both the app and the queue. Just follow these steps:
153
+
Running Solid Queue in a separate database is recommended, but it's also possible to use one single database for both the app and the queue. Follow these steps:
154
154
155
155
1. Copy the contents of `db/queue_schema.rb` into a normal migration and delete `db/queue_schema.rb`
156
156
2. Remove `config.solid_queue.connects_to` from `production.rb`
157
157
3. Migrate your database. You are ready to run `bin/jobs`
158
158
159
159
You won't have multiple databases, so `database.yml` doesn't need to have primary and queue database.
160
160
161
-
### Dashboard ui setup
161
+
### Dashboard UI Setup
162
162
163
163
For viewing information about your jobs via a UI, we recommend taking a look at [mission_control-jobs](https://github.com/rails/mission_control-jobs), a dashboard where, among other things, you can examine and retry/discard failed jobs.
164
164
@@ -181,7 +181,7 @@ Solid Queue was designed for the highest throughput when used with MySQL 8+ or P
181
181
182
182
## Configuration
183
183
184
-
### Workers, dispatchers and scheduler
184
+
### Workers, dispatchers, and scheduler
185
185
186
186
We have several types of actors in Solid Queue:
187
187
@@ -330,7 +330,7 @@ queues: back*
330
330
```
331
331
332
332
333
-
### Threads, processes and signals
333
+
### Threads, processes, and signals
334
334
335
335
Workers in Solid Queue use a thread pool to run work in multiple threads, configurable via the `threads` parameter above. Besides this, parallelism can be achieved via multiple processes on one machine (configurable via different workers or the `processes` parameter above) or by horizontal scaling.
336
336
@@ -366,7 +366,7 @@ There are several settings that control how Solid Queue works that you can set a
366
366
367
367
**This is not used for errors raised within a job execution**. Errors happening in jobs are handled by Active Job's `retry_on` or `discard_on`, and ultimately will result in [failed jobs](#failed-jobs-and-retries). This is for errors happening within Solid Queue itself.
368
368
369
-
- `use_skip_locked`: whether to use `FOR UPDATE SKIP LOCKED` when performing locking reads. This will be automatically detected in the future, and for now, you'd only need to set this to `false` if your database doesn't support it. For MySQL, that'd be versions < 8, and for PostgreSQL, versions < 9.5. If you use SQLite, this has no effect, as writes are sequential.
369
+
- `use_skip_locked`: whether to use `FOR UPDATE SKIP LOCKED` when performing locking reads. This will be automatically detected in the future, and for now, you only need to set this to `false` if your database doesn't support it. For MySQL, that'd be versions < 8, and for PostgreSQL, versions < 9.5. If you use SQLite, this has no effect, as writes are sequential.
370
370
- `process_heartbeat_interval`: the heartbeat interval that all processes will follow—defaults to 60 seconds.
371
371
- `process_alive_threshold`: how long to wait until a process is considered dead after its last heartbeat—defaults to 5 minutes.
372
372
- `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 5 seconds.
0 commit comments