Skip to content

Commit 2a0f11b

Browse files
committed
Add instructions about upgrading to versions 0.4.x and 0.3.x
1 parent 8342d8e commit 2a0f11b

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

UPGRADING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Upgrading to version 0.4.x
2+
This version introduced an _async_ mode to run the supervisor and have all workers and dispatchers run as part of the same process as the supervisor, instead of separate, forked, processes. Together with this, we introduced some changes in how the supervisor is started. Prior this change, you could choose whether you wanted to run workers, dispatchers or both, by starting Solid Queue as `solid_queue:work` or `solid_queue:dispatch`. From version 0.4.0, the only option available is:
3+
4+
```
5+
$ bundle exec rake solid_queue:start
6+
```
7+
Whether the supervisor starts workers, dispatchers or both will depend on your configuration. For example, if you don't configure any dispatchers, only workers will be started. That is, with this configuration:
8+
9+
```yml
10+
production:
11+
workers:
12+
- queues: [ real_time, background ]
13+
threads: 5
14+
polling_interval: 0.1
15+
processes: 3
16+
```
17+
the supervisor will run 3 workers, each one with 5 threads, and no supervisors. With this configuration:
18+
```yml
19+
production:
20+
dispatchers:
21+
- polling_interval: 1
22+
batch_size: 500
23+
concurrency_maintenance_interval: 300
24+
```
25+
the supervisor will run 1 dispatcher and no workers.
26+
27+
28+
# Upgrading to version 0.3.x
29+
30+
This version introduced support for [recurring (cron-style) jobs](https://github.com/rails/solid_queue/blob/main/README.md#recurring-tasks), and it needs a new DB migration for it. To install it, just run:
31+
32+
```bash
33+
$ bin/rails solid_queue:install:migrations
34+
```
35+
36+
Or, if you're using a different database for Solid Queue:
37+
38+
```bash
39+
$ bin/rails solid_queue:install:migrations DATABASE=<the_name_of_your_solid_queue_db>
40+
```
41+
42+
And then run the migrations.

solid_queue.gemspec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Gem::Specification.new do |spec|
1010
spec.description = "Database-backed Active Job backend."
1111
spec.license = "MIT"
1212

13+
spec.post_install_message = <<~MESSAGE
14+
Upgrading to Solid Queue 0.4.x? There are some breaking changes about how Solid Queue is started. Check
15+
https://github.com/rails/solid_cache/blob/main/UPGRADING.md for upgrade instructions.
16+
MESSAGE
17+
1318
spec.metadata["homepage_uri"] = spec.homepage
1419
spec.metadata["source_code_uri"] = "https://github.com/rails/solid_queue"
1520

0 commit comments

Comments
 (0)