Skip to content

Commit be7cb79

Browse files
committed
WIP proper README
1 parent 7071c16 commit be7cb79

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

README.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# SolidQueue
2-
Short description and motivation.
1+
# Solid Queue
2+
3+
Solid Queue is a DB-based queuing backend for [Active Job](https://edgeguides.rubyonrails.org/active_job_basics.html). It can be used with SQL databases such as MySQL, PostgreSQL or SQLite.
4+
It's been designed with simplicity and performance in mind. It relies on Active Job for retries, discarding, error handling, serialization, or delays, and it's compatible with Ruby on Rails muulti-threading.
35

46
## Usage
5-
How to use my plugin.
7+
To set Solid Queue as your Active Job's queue backend, you should add this to your environment config:
8+
```ruby
9+
config.active_job.queue_adapter = :solid_queue
10+
```
11+
12+
Alternatively, you can set only specific jobs to use Solid Queue as their backend if you're migrating from another adapter and want to move jobs progressively:
13+
14+
```ruby
15+
class MyJob < ApplicationJob
16+
self.queue_adapter = :solid_queue
17+
# ...
18+
end
19+
```
620

721
## Installation
822
Add this line to your application's Gemfile:
@@ -21,8 +35,30 @@ Or install it yourself as:
2135
$ gem install solid_queue
2236
```
2337

24-
## Contributing
25-
Contribution directions go here.
38+
Add the migration to your app and run it:
39+
```
40+
$ bin/rails solid_queue:install:migrations
41+
$ bin/rails db:migrate
42+
```
43+
44+
With this, you'll be ready to enqueue jobs using Solid Queue, but to run them, you need to configure Solid Queue's processes and start Solid Queue's supervisor. By default, Solid Queue will try to find your queues configuration under `config/solid_queue.yml`, but you can set a different path using the environment variable `SOLID_QUEUE_CONFIG`.
45+
46+
```yml
47+
production:
48+
dispatcher:
49+
polling_interval: 1
50+
batch_size: 500
51+
workers:
52+
- queues: *
53+
54+
```
55+
$ bundle exec rake solid_queue:start
56+
```
57+
58+
59+
## Configuration
60+
61+
2662
2763
## License
2864
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)