notifiable-rails 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1568aa8b106822a5c8d0457880a359cc8520d36b
|
4
|
+
data.tar.gz: 1ff305b880ca795e9a0d27e6df9c1f114ade6323
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31981dadd92116a72679a5fc620c63297843719cdd333f074be5d85e028d29f14bcff265b3d79271da2fb664c4f313cd3625cb37ee9fc24c0f56b033212604ee
|
7
|
+
data.tar.gz: f80118b0e079041e81ba32882f9913b14806e00326fb9d468d09b233c9011dfa83a5dc36c2eafb366842f391c58acd003cdf831b7453d3bd18e19b53f95c8f8a
|
@@ -10,6 +10,11 @@ Notifiable.configure do |config|
|
|
10
10
|
# The class representing the holder of the device
|
11
11
|
config.user_class = User
|
12
12
|
|
13
|
+
# The size of the batch of Notification Statuses kept in memory
|
14
|
+
# before being saved. This should be varied with the heap size of the process
|
15
|
+
# sending the notifications. Defaults to 10,000.
|
16
|
+
#config.notification_status_batch_size = 10000
|
17
|
+
|
13
18
|
# Set the delivery method to test, preventing notifications from being sent
|
14
19
|
# Defaults to :send
|
15
20
|
#config.delivery_method = :test
|
data/lib/notifiable.rb
CHANGED
@@ -23,7 +23,7 @@ module Notifiable
|
|
23
23
|
def processed(notification, device_token, status)
|
24
24
|
receipts << {notification_id: notification.id, device_token_id: device_token.id, status: status, created_at: DateTime.now}
|
25
25
|
|
26
|
-
if receipts.count >
|
26
|
+
if receipts.count > Notifiable.notification_status_batch_size
|
27
27
|
save_receipts
|
28
28
|
end
|
29
29
|
end
|
data/lib/notifiable/version.rb
CHANGED