messaging 4.0.2.pre → 4.0.4.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/messaging/adapters/postgres/consumer.rb +5 -0
- data/lib/messaging/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f76dc35b493eb944a479e329a474a7489fe8f343e5e0cb61b4becd1b584386c5
|
4
|
+
data.tar.gz: d8ae5780117ac2b18a0fc30fa02e2801eb0b19db0cd92c4d3548099c1814e8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b767a34378a64ef4ff9065b45665fafa3a66322d82c410b218683949dc0536466be365e842b341ff83c8a32a564d4c05ae3b3971a1fb453800c46052320a8e4c
|
7
|
+
data.tar.gz: a38d74910ce0f4ed0decd9b59108f80b821058626f58fae043afdbb597f93bd96dafe375a9d94ea2f826c6e665012fa409ed245051265d16d039836f32875f9c
|
data/Gemfile.lock
CHANGED
@@ -44,6 +44,7 @@ module Messaging
|
|
44
44
|
|
45
45
|
def process_messages
|
46
46
|
while @running do
|
47
|
+
Meter.histogram('messaging.consumer.lag', unprocessed_messages_count, tags: { consumer: name })
|
47
48
|
messages = fetch_messages
|
48
49
|
messages.each do |message|
|
49
50
|
process_message(message)
|
@@ -64,6 +65,10 @@ module Messaging
|
|
64
65
|
sleep 5
|
65
66
|
end
|
66
67
|
|
68
|
+
def unprocessed_messages_count
|
69
|
+
fetch_messages.limit(nil).count
|
70
|
+
end
|
71
|
+
|
67
72
|
def fetch_messages
|
68
73
|
SerializedMessage.in_category(categories)
|
69
74
|
.with_transaction_id_lower_than_any_currently_running_transaction
|
data/lib/messaging/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bukowskis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|