solid_cable 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cc364cff3708e09a42f27d3771c1f3f8393d14608e643f190ddc4edc1411d71
|
4
|
+
data.tar.gz: '0419dea96ac486d8c4c294d287ff53e23a87b534455af375c625c9473ff3e5c7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81fe63e8fcf0cdd2b0ecbae7421a11a6ef39c881f1f43ca1d56677d9ebccbf5410e753ff8e6f96849244391022629c8df01fd946f7d991ca7dd1e056e4d2702a
|
7
|
+
data.tar.gz: 7a08ffa497dd41d93977c423c3b60749816ff03e8ce670933e54d1e01524cdf690e7effa5ce039704887bbdcd0b49edb1e57123e4f097b5a5d529f44ed3f14b3
|
@@ -3,13 +3,13 @@
|
|
3
3
|
module SolidCable
|
4
4
|
class Message < SolidCable::Record
|
5
5
|
scope :prunable, lambda {
|
6
|
-
where(created_at:
|
6
|
+
where(created_at: ..::SolidCable.keep_messages_around_for.ago)
|
7
7
|
}
|
8
8
|
scope :broadcastable, lambda { |channels, last_id|
|
9
9
|
where(channel: channels).where(id: (last_id + 1)..).order(:id)
|
10
10
|
}
|
11
11
|
|
12
|
-
def prune
|
12
|
+
def self.prune
|
13
13
|
prunable.delete_all
|
14
14
|
end
|
15
15
|
end
|
data/lib/solid_cable/version.rb
CHANGED