The value returned for enqueue_after_transaction_commit?
has changed to true
, and it's no longer configurable. If you want to change this, you need to use Active Job's configuration options.
This version has two breaking changes regarding configuration:
- The default configuration file has changed from
config/solid_queue.yml
toconfig/queue.yml
. - Recurring tasks are now defined in
config/recurring.yml
(by default). Before, they would be defined as part of the dispatcher configuration. Now they've been upgraded to their own configuration file, and a dedicated process (the scheduler) to manage them. Check the Recurring tasks section in theREADME
to learn how to configure them in detail. They still follow the same format as before when they lived underdispatchers > recurring_tasks
.
IMPORTANT: This version collapsed all migrations into a single db/queue_schema.rb
, that will use a separate queue
database on install. If you're upgrading from a version < 0.6.0, you need to upgrade to 0.6.0 first, ensure all migrations are up-to-date, and then upgrade further. You don't have to switch to a separate queue
database or use the new db/queue_schema.rb
file, these are for people starting on a version >= 0.8.x. You can continue using your existing database (be it separate or the same as your app) as long as you run all migrations defined up to version 0.6.0.
This version removed the new async mode introduced in version 0.4.0 and introduced a new binstub that can be used to start Solid Queue's supervisor.
To install the binstub bin/jobs
, you can just run:
bin/rails generate solid_queue:install
This version adds two new migrations to modify the solid_queue_processes
table. The goal of that migration is to add a new column that needs to be NOT NULL
. This needs to be done with two migrations and the following steps to ensure it happens without downtime and with new processes being able to register just fine:
- Run the first migration that adds the new column, nullable
- Deploy the updated Solid Queue code that uses this column
- Run the second migration. This migration does two things:
- Backfill existing rows that would have the column as NULL
- Make the column not nullable and add a new index
Besides, it adds another migration with no effects to the solid_queue_recurring_tasks
table. This one can be run just fine whenever, as the column affected is not used.
To install the migrations:
$ bin/rails solid_queue:install:migrations
Or, if you're using a different database for Solid Queue:
$ bin/rails solid_queue:install:migrations DATABASE=<the_name_of_your_solid_queue_db>
And then follow the steps above, running first one, then deploying the code, then running the second one.
From this version onwards, when a worker is killed and the supervisor can detect that, it'll fail in-progress jobs claimed by that worker. For this to work correctly, you need to run the above migration and ensure you restart any supervisors you'd have.
This version includes a new migration to improve recurring tasks. To install it, just run:
$ bin/rails solid_queue:install:migrations
Or, if you're using a different database for Solid Queue:
$ bin/rails solid_queue:install:migrations DATABASE=<the_name_of_your_solid_queue_db>
And then run the migrations.
This version introduced an async mode (this mode has been removed in version 0.7.0) 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:
$ bundle exec rake solid_queue:start
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:
production:
workers:
- queues: [ real_time, background ]
threads: 5
polling_interval: 0.1
processes: 3
the supervisor will run 3 workers, each one with 5 threads, and no supervisors. With this configuration:
production:
dispatchers:
- polling_interval: 1
batch_size: 500
concurrency_maintenance_interval: 300
the supervisor will run 1 dispatcher and no workers.
This version introduced support for recurring (cron-style) jobs, and it needs a new DB migration for it. To install it, just run:
$ bin/rails solid_queue:install:migrations
Or, if you're using a different database for Solid Queue:
$ bin/rails solid_queue:install:migrations DATABASE=<the_name_of_your_solid_queue_db>
And then run the migrations.