messaging 4.0.2.pre → 4.0.3.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: 1ca7a1f9acbfc6039457c0b8f7f271a70dd23c73894c9d8cfeb9f5ccba7ad125
4
+ data.tar.gz: 3fbdc20c27c5d2c8afb2574ea984f04023b2d6f3283ffe2c072d94f02f19fe87
5
5
  SHA512:
6
- metadata.gz: 81005a85d53c14d7e200240b5310ef0b10bd8eca6f988c30f0995810097a00a0449bbf01d9dac6726641abcaf3edacdca27d87e8752ff17ebe1e4235af536455
7
- data.tar.gz: 76754877fabaf8f406c6d64161ae46cb60407c3ab6bec0dae59ad50ba75482d1179046dcab87abaa69a008cae80d983497b06901b56565856cae58d6b99edd35
6
+ metadata.gz: 4434a696acc2a2018d943c2b78b9fdfda2d78216ab47ffb93c27a59c9df45c750ffdbdf23d26ef5e364da9c7408a732f420395d81bcf64f7e79d7a7652cb0ea6
7
+ data.tar.gz: f46171599d6ef0b1c317e251c4dcf7a28b08d376d616eca9d61b678e0af7e44dec1259619df0c35f689b60fd6d487fd1c358a3147de047d93a2e34be07341031
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.3.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.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.3.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.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-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