messaging 4.0.3.pre → 4.0.5

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: 1ca7a1f9acbfc6039457c0b8f7f271a70dd23c73894c9d8cfeb9f5ccba7ad125
4
- data.tar.gz: 3fbdc20c27c5d2c8afb2574ea984f04023b2d6f3283ffe2c072d94f02f19fe87
3
+ metadata.gz: c87e653e527433818875b3b98f39b57e96e0ad4d6d6768af9c447c889bc6a023
4
+ data.tar.gz: 1d9022a5ad433b724394abee582ae61c136ca4f2b800251d9a475570189b6e4a
5
5
  SHA512:
6
- metadata.gz: 4434a696acc2a2018d943c2b78b9fdfda2d78216ab47ffb93c27a59c9df45c750ffdbdf23d26ef5e364da9c7408a732f420395d81bcf64f7e79d7a7652cb0ea6
7
- data.tar.gz: f46171599d6ef0b1c317e251c4dcf7a28b08d376d616eca9d61b678e0af7e44dec1259619df0c35f689b60fd6d487fd1c358a3147de047d93a2e34be07341031
6
+ metadata.gz: 231eb2da912229c56f3fefd8b57b7d2a314ef86d554430a17228b3d94da64100fd8580f1b7f30541e51cd8d787d09b48f0c891a71e7ecee545cbaadbc9957c38
7
+ data.tar.gz: c8f73a2c7495625c0e2e37c419358b72cf49495cf4ecaa3442c9c550905534d0d16554bfe9480e15128b135d99012bd727a9917ab3fc0e26b0982a61c9faaaff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- messaging (4.0.3.pre)
4
+ messaging (4.0.5)
5
5
  activerecord
6
6
  activesupport
7
7
  after_transaction
@@ -66,7 +66,7 @@ module Messaging
66
66
  end
67
67
 
68
68
  def unprocessed_messages_count
69
- fetch_messages.count
69
+ fetch_messages.limit(nil).count
70
70
  end
71
71
 
72
72
  def fetch_messages
@@ -72,6 +72,7 @@ module Messaging
72
72
  return super if readonly?
73
73
  with_locked_stream do
74
74
  set_stream_position
75
+ set_transaction_id
75
76
  validate_expected_version!
76
77
  super
77
78
  end
@@ -88,6 +89,10 @@ module Messaging
88
89
  self.stream_position = current_stream_position + 1
89
90
  end
90
91
 
92
+ def set_transaction_id
93
+ self.transaction_id = connection.select_value('SELECT pg_current_xact_id()')
94
+ end
95
+
91
96
  def validate_expected_version!
92
97
  ExpectedVersion.new(expected_version || :any).match!(current_stream_position)
93
98
  end
@@ -1,3 +1,3 @@
1
1
  module Messaging
2
- VERSION = '4.0.3.pre'.freeze
2
+ VERSION = '4.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3.pre
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bukowskis