Skip to content

Commit 6e4a31e

Browse files
committed
Clarify logging in development when using bin/jobs
Closes #423
1 parent a3cce99 commit 6e4a31e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,23 @@ Next, add the following to `development.rb`
9898
```ruby
9999
# Use Solid Queue in Development.
100100
config.active_job.queue_adapter = :solid_queue
101-
config.solid_queue.connects_to = {database: {writing: :queue}}
101+
config.solid_queue.connects_to = { database: { writing: :queue } }
102102
```
103103

104104
Once you've added this, run `db:prepare` to create the Solid Queue database and load the schema.
105105

106-
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:
106+
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:
107107

108108
```ruby
109109
# You can either set the env var, or check for development
110110
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] || Rails.env.development?
111111
```
112112

113+
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:
114+
```ruby
115+
config.solid_queue.logger = ActiveSupport::Logger.new(STDOUT)
116+
```
117+
113118
**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.
114119

115120
In `config/cable.yml`

0 commit comments

Comments
 (0)