From a3cce99d415aa4668ad62937167afaa10da738fd Mon Sep 17 00:00:00 2001 From: buncis Date: Thu, 26 Dec 2024 19:56:34 +0700 Subject: [PATCH 1/2] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c278f5aa..6f12a080 100644 --- a/README.md +++ b/README.md @@ -503,7 +503,7 @@ If you're using Puma in development but you don't want to use Solid Queue in dev ```ruby plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] ``` -that you set in production only. This is what Rails 8's default Puma config looks like. Otherwise, if you're using Puma in development but not Solid Queue, starting Pumna would start also Solid Queue supervisor and it'll most likely fail because it won't be properly configured. +that you set in production only. This is what Rails 8's default Puma config looks like. Otherwise, if you're using Puma in development but not Solid Queue, starting Puma would start also Solid Queue supervisor and it'll most likely fail because it won't be properly configured. ## Jobs and transactional integrity From 6e4a31ec3662bb5f4c22a52f2b9c38b2c63ace44 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Thu, 26 Dec 2024 21:17:59 +0100 Subject: [PATCH 2/2] 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`