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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57c53952e42de9fffee05500cd9bd9c16d87bb08b6ae79945e7e5cc43467e2db
4
- data.tar.gz: d56112b7c1d5a096cdf9f77f4ef01834e14a00b3a427224db3bd6684d594e250
3
+ metadata.gz: f76dc35b493eb944a479e329a474a7489fe8f343e5e0cb61b4becd1b584386c5
4
+ data.tar.gz: d8ae5780117ac2b18a0fc30fa02e2801eb0b19db0cd92c4d3548099c1814e8f0
5
5
  SHA512:
6
- metadata.gz: 81005a85d53c14d7e200240b5310ef0b10bd8eca6f988c30f0995810097a00a0449bbf01d9dac6726641abcaf3edacdca27d87e8752ff17ebe1e4235af536455
7
- data.tar.gz: 76754877fabaf8f406c6d64161ae46cb60407c3ab6bec0dae59ad50ba75482d1179046dcab87abaa69a008cae80d983497b06901b56565856cae58d6b99edd35
6
+ metadata.gz: b767a34378a64ef4ff9065b45665fafa3a66322d82c410b218683949dc0536466be365e842b341ff83c8a32a564d4c05ae3b3971a1fb453800c46052320a8e4c
7
+ data.tar.gz: a38d74910ce0f4ed0decd9b59108f80b821058626f58fae043afdbb597f93bd96dafe375a9d94ea2f826c6e665012fa409ed245051265d16d039836f32875f9c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- messaging (4.0.1.pre)
4
+ messaging (4.0.4.pre)
5
5
  activerecord
6
6
  activesupport
7
7
  after_transaction
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Messaging
2
- VERSION = '4.0.2.pre'.freeze
2
+ VERSION = '4.0.4.pre'.freeze
3
3
  end
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.2.pre
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-03 00:00:00.000000000 Z
11
+ date: 2024-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord