sbmt-outbox 6.10.5 → 6.11.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e410e7a4507b5470d10986ac8d9949c4c9460a6773a97063b0287d9e777c4d9
|
4
|
+
data.tar.gz: ef17da6564faeb5f17cee5073cbecebeca083a555a9c046d0794f210f1a1b414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e5fa1c14bab5bee90e4f5c664c22cdc5e8bea8fcfca391a3eb967ddf1c3b57b96080ab147cf366e5cbc9d2add8d486b8b2ca5ebfe8c9e96d0e989ab27ae685d
|
7
|
+
data.tar.gz: c47678da77b2f59787dd64cd162974b7cd4f6954fc2fafae54614b930fcf44068498491aaddae77d99b86f50dc67637b2090ae7d155a844ca193b9f011cf7189
|
@@ -1,8 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "../../../../lib/sbmt/outbox/enum_refinement"
|
4
|
+
|
3
5
|
module Sbmt
|
4
6
|
module Outbox
|
5
7
|
class BaseItem < Outbox.active_record_base_class
|
8
|
+
# For compatibility with rails < 7
|
9
|
+
# Remove when drop support of Rails < 7
|
10
|
+
using EnumRefinement
|
11
|
+
|
6
12
|
self.abstract_class = true
|
7
13
|
|
8
14
|
class << self
|
@@ -26,8 +32,8 @@ module Sbmt
|
|
26
32
|
|
27
33
|
def calc_bucket_partitions(count)
|
28
34
|
(0...count).to_a
|
29
|
-
.
|
30
|
-
|
35
|
+
.index_with do |x|
|
36
|
+
(0...config.bucket_size).to_a
|
31
37
|
.select { |p| p % count == x }
|
32
38
|
end
|
33
39
|
end
|
@@ -46,7 +52,7 @@ module Sbmt
|
|
46
52
|
end
|
47
53
|
end
|
48
54
|
|
49
|
-
enum status
|
55
|
+
enum :status, {
|
50
56
|
pending: 0,
|
51
57
|
failed: 1,
|
52
58
|
delivered: 2,
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sbmt
|
4
|
+
module Outbox
|
5
|
+
module EnumRefinement
|
6
|
+
refine ActiveRecord::Base.singleton_class do
|
7
|
+
def enum(name, values = nil)
|
8
|
+
if Rails::VERSION::MAJOR >= 7
|
9
|
+
super
|
10
|
+
else
|
11
|
+
super(name => values)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/sbmt/outbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbmt-outbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sbermarket Ruby-Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -86,20 +86,20 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '6.0'
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '8'
|
92
|
+
version: '8.1'
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: '
|
99
|
+
version: '6.0'
|
100
100
|
- - "<"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '8'
|
102
|
+
version: '8.1'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: yabeda
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -563,6 +563,7 @@ files:
|
|
563
563
|
- lib/sbmt/outbox/cli.rb
|
564
564
|
- lib/sbmt/outbox/database_switcher.rb
|
565
565
|
- lib/sbmt/outbox/engine.rb
|
566
|
+
- lib/sbmt/outbox/enum_refinement.rb
|
566
567
|
- lib/sbmt/outbox/error_tracker.rb
|
567
568
|
- lib/sbmt/outbox/errors.rb
|
568
569
|
- lib/sbmt/outbox/instrumentation/open_telemetry_loader.rb
|
@@ -626,7 +627,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
626
627
|
- !ruby/object:Gem::Version
|
627
628
|
version: '0'
|
628
629
|
requirements: []
|
629
|
-
rubygems_version: 3.
|
630
|
+
rubygems_version: 3.1.6
|
630
631
|
signing_key:
|
631
632
|
specification_version: 4
|
632
633
|
summary: Outbox service
|