Skip to content

Change default config file from solid_queue.yml to just queue.yml #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Solid Queue is configured by default in new Rails 8 applications. But if you're
1. `bundle add solid_queue`
2. `bin/rails solid_queue:install`

This will configure Solid Queue as the production Active Job backend, create the configuration files `config/solid_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.
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.

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:

Expand Down Expand Up @@ -90,7 +90,7 @@ We have several types of actors in Solid Queue:

Solid Queue's supervisor will fork a separate process for each supervised worker/dispatcher/scheduler.

By default, Solid Queue will try to find your configuration under `config/solid_queue.yml`, but you can set a different path using the environment variable `SOLID_QUEUE_CONFIG` or by using the `-c/--config_file` option with `bin/jobs`, like this:
By default, Solid Queue will try to find your configuration under `config/queue.yml`, but you can set a different path using the environment variable `SOLID_QUEUE_CONFIG` or by using the `-c/--config_file` option with `bin/jobs`, like this:

```
bin/jobs -c config/calendar.yml
Expand Down
6 changes: 3 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Upgrading to version 0.9.x
This version changes how recurring tasks are configured. 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 the `README` to learn how to configure them in detail.

In short, they live now in `config/recurring.yml` (by default) and follow the same format as before when they lived under `dispatchers > recurring_tasks`.
This version has two breaking changes regarding configuration:
- The default configuration file has changed from `config/solid_queue.yml` to `config/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 the `README` to learn how to configure them in detail. They still follow the same format as before when they lived under `dispatchers > recurring_tasks`.

# Upgrading to version 0.8.x
*IMPORTANT*: This version collapsed all migrations into a single `db/queue_schema.rb`, that will use a separate `queue` database. 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.
Expand Down
1 change: 1 addition & 0 deletions lib/generators/solid_queue/install/USAGE
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Example:

This will perform the following:
Adds solid_queue db schema
Adds default configurations
Replaces Active Job's adapter in environment configuration
Installs bin/jobs binstub to start the supervisor
2 changes: 1 addition & 1 deletion lib/generators/solid_queue/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class SolidQueue::InstallGenerator < Rails::Generators::Base
source_root File.expand_path("templates", __dir__)

def copy_files
template "config/solid_queue.yml"
template "config/queue.yml"
template "db/queue_schema.rb"
template "bin/jobs"
chmod "bin/jobs", 0755 & ~File.umask, verbose: false
Expand Down
2 changes: 1 addition & 1 deletion lib/solid_queue/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def instantiate
concurrency_maintenance_interval: 600
}

DEFAULT_CONFIG_FILE_PATH = "config/solid_queue.yml"
DEFAULT_CONFIG_FILE_PATH = "config/queue.yml"
DEFAULT_RECURRING_SCHEDULE_FILE_PATH = "config/recurring.yml"

def initialize(**options)
Expand Down
File renamed without changes.