messaging 4.0.1.pre → 4.0.3.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
- data/lib/messaging.rb +2 -2
- 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: 1ca7a1f9acbfc6039457c0b8f7f271a70dd23c73894c9d8cfeb9f5ccba7ad125
|
4
|
+
data.tar.gz: 3fbdc20c27c5d2c8afb2574ea984f04023b2d6f3283ffe2c072d94f02f19fe87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4434a696acc2a2018d943c2b78b9fdfda2d78216ab47ffb93c27a59c9df45c750ffdbdf23d26ef5e364da9c7408a732f420395d81bcf64f7e79d7a7652cb0ea6
|
7
|
+
data.tar.gz: f46171599d6ef0b1c317e251c4dcf7a28b08d376d616eca9d61b678e0af7e44dec1259619df0c35f689b60fd6d487fd1c358a3147de047d93a2e34be07341031
|
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.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
data/lib/messaging.rb
CHANGED
@@ -5,7 +5,7 @@ require 'active_support'
|
|
5
5
|
require 'active_support/notifications'
|
6
6
|
require 'active_support/core_ext'
|
7
7
|
|
8
|
-
if RUBY_VERSION == '2
|
8
|
+
if RUBY_VERSION.split('.').first == '2'
|
9
9
|
require 'messaging/config_23'
|
10
10
|
else
|
11
11
|
require 'messaging/config'
|
@@ -18,7 +18,7 @@ require 'messaging/exception_handler'
|
|
18
18
|
require 'messaging/message'
|
19
19
|
require 'messaging/message/from_json'
|
20
20
|
|
21
|
-
if RUBY_VERSION == '2
|
21
|
+
if RUBY_VERSION.split('.').first == '2'
|
22
22
|
require 'messaging/routing_23'
|
23
23
|
else
|
24
24
|
require 'messaging/routing'
|
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.3.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
|