From 6e4a31ec3662bb5f4c22a52f2b9c38b2c63ace44 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Thu, 26 Dec 2024 21:17:59 +0100 Subject: [PATCH] Clarify logging in development when using `bin/jobs` Closes #423 --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f12a080..bc8bb600 100644 --- a/README.md +++ b/README.md @@ -98,18 +98,23 @@ Next, add the following to `development.rb` ```ruby # Use Solid Queue in Development. config.active_job.queue_adapter = :solid_queue - config.solid_queue.connects_to = {database: {writing: :queue}} + config.solid_queue.connects_to = { database: { writing: :queue } } ``` Once you've added this, run `db:prepare` to create the Solid Queue database and load the schema. -Finally, in order for jobs to be processed, you'll need to have Solid Queue running. In Development, this can be done via the Puma plugin. In `puma.rb` update the following line: +Finally, in order for jobs to be processed, you'll need to have Solid Queue running. In Development, this can be done via [the Puma plugin](#puma-plugin) as well. In `puma.rb` update the following line: ```ruby # You can either set the env var, or check for development plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] || Rails.env.development? ``` +You can also just use `bin/jobs`, but in this case you might want to [set a different logger for Solid Queue](#other-configuration-settings) because the default logger will log to `log/development.log` and you won't see anything when you run `bin/jobs`. For example: +```ruby +config.solid_queue.logger = ActiveSupport::Logger.new(STDOUT) +``` + **Import Note about Action Cable**: If you use Action Cable (or anything dependent on Action Cable, such as Turbo Streams), you will need to also need to update it to use a database. In `config/cable.yml`