Skip to content

Commit 4145536

Browse files
committed
Update readme bump version
1 parent 9a99c04 commit 4145536

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ Update `config/cable.yml` to use the new adapter. connects_to is can be omitted
3535
if you want to use the primary database.
3636

3737
```yaml
38-
development:
38+
default: &default
3939
adapter: solid_cable
40-
silence_polling: true
4140
polling_interval: 1.second
42-
keep_messages_around_for: 30.minutes
41+
keep_messages_around_for: 1.day
42+
43+
development:
44+
<<: *default
45+
silence_polling: true
4346
connects_to:
4447
database:
4548
writing: solid_cable_primary
@@ -49,9 +52,8 @@ test:
4952
adapter: test
5053

5154
production:
52-
adapter: solid_cable
55+
<<: *default
5356
polling_interval: 0.1.seconds
54-
keep_messages_around_for: 10.minutes
5557
```
5658
5759
Finally, you need to run the migrations:
@@ -60,5 +62,10 @@ Finally, you need to run the migrations:
6062
$ bin/rails db:migrate
6163
```
6264

65+
By default messages are kept around forever. SolidCable ships with a job to
66+
prune messages. You can run `SolidCable::PruneJob.perform_later` which removes
67+
Messages that are older than what is specified in `keep_messages_around_for`
68+
setting.
69+
6370
## License
6471
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

app/models/jobs/solid_cable/prune_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module SolidCable
44
class PruneJob < ActiveJob::Base
55
def perform
6-
Message.prunable.delete_all
6+
::SolidCable::Message.prunable.delete_all
77
end
88
end
99
end

lib/solid_cable/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module SolidCable
4-
VERSION = "0.4.0"
4+
VERSION = "1.0.0"
55
end

0 commit comments

Comments
 (0)