bbk-app 1.1.1.276745 → 1.1.1.289658
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -4
- data/lib/bbk/app/dispatcher/message.rb +22 -0
- 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: adf65569a9d9aba73e6b912a63958e9e1af8cc02624d23b2edb19cc4638c56a6
|
|
4
|
+
data.tar.gz: d730e42e929be4c4363121189e5bde5e70305f5cdde776d2fc0b3b1e53bdce96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 472c3e59792976eee0ce0664e6f586c1147304ab70216a31b262dcdf14ca798699c5442945afbf0e2b0b8692e3ec3cc65848473975dc28f245c42e737c82d7da
|
|
7
|
+
data.tar.gz: 6e7a55468ffe4bea1d1cc2e3c4a03ae2683369e429c8ad26754c6169d4ea629685ca5de7a3aaf2a3dee2950f5369410c174063a5d9f5d4c7ab5cb84799ba1ac3
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bbk-app (1.1.1.
|
|
4
|
+
bbk-app (1.1.1.289658)
|
|
5
5
|
activesupport (>= 6.0)
|
|
6
6
|
bbk-utils (> 1.0.1)
|
|
7
7
|
oj
|
|
@@ -33,7 +33,7 @@ GEM
|
|
|
33
33
|
bbk-utils (1.0.1.147183)
|
|
34
34
|
activesupport (>= 6.0)
|
|
35
35
|
russian
|
|
36
|
-
bigdecimal (3.1.
|
|
36
|
+
bigdecimal (3.1.9)
|
|
37
37
|
bunny (2.19.0)
|
|
38
38
|
amq-protocol (~> 2.3, >= 2.3.1)
|
|
39
39
|
sorted_set (~> 1, >= 1.0.2)
|
|
@@ -67,8 +67,9 @@ GEM
|
|
|
67
67
|
kwalify (0.7.2)
|
|
68
68
|
launchy (2.5.0)
|
|
69
69
|
addressable (~> 2.7)
|
|
70
|
+
mini_portile2 (2.8.8)
|
|
70
71
|
minitest (5.15.0)
|
|
71
|
-
oj (3.16.
|
|
72
|
+
oj (3.16.9)
|
|
72
73
|
bigdecimal (>= 3.0)
|
|
73
74
|
ostruct (>= 0.2)
|
|
74
75
|
ostruct (0.6.1)
|
|
@@ -143,7 +144,9 @@ GEM
|
|
|
143
144
|
sorted_set (1.0.3)
|
|
144
145
|
rbtree
|
|
145
146
|
set (~> 1.0)
|
|
146
|
-
sqlite3 (1.
|
|
147
|
+
sqlite3 (1.7.3)
|
|
148
|
+
mini_portile2 (~> 2.8.0)
|
|
149
|
+
sqlite3 (1.7.3-x86_64-linux)
|
|
147
150
|
terminal-table (3.0.2)
|
|
148
151
|
unicode-display_width (>= 1.1.1, < 3)
|
|
149
152
|
thread_safe (0.3.6)
|
|
@@ -161,6 +164,8 @@ GEM
|
|
|
161
164
|
|
|
162
165
|
PLATFORMS
|
|
163
166
|
ruby
|
|
167
|
+
x86_64-linux
|
|
168
|
+
x86_64-linux-musl
|
|
164
169
|
|
|
165
170
|
DEPENDENCIES
|
|
166
171
|
activerecord (~> 6.0)
|
|
@@ -12,6 +12,8 @@ module BBK
|
|
|
12
12
|
@delivery_info = delivery_info
|
|
13
13
|
@headers = headers.to_h.with_indifferent_access
|
|
14
14
|
@body = body
|
|
15
|
+
@acked = false
|
|
16
|
+
@nacked = false
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
# Lazy body parsing
|
|
@@ -24,11 +26,19 @@ module BBK
|
|
|
24
26
|
end
|
|
25
27
|
|
|
26
28
|
def ack(*args, answer: nil, **kwargs)
|
|
29
|
+
return if processed?
|
|
30
|
+
|
|
27
31
|
consumer.ack(self, *args, answer: answer, **kwargs)
|
|
32
|
+
@acked = true
|
|
33
|
+
nil
|
|
28
34
|
end
|
|
29
35
|
|
|
30
36
|
def nack(*args, error: nil, **kwargs)
|
|
37
|
+
return if processed?
|
|
38
|
+
|
|
31
39
|
consumer.nack(self, *args, error: error, **kwargs)
|
|
40
|
+
@nacked = true
|
|
41
|
+
nil
|
|
32
42
|
end
|
|
33
43
|
|
|
34
44
|
def message_id
|
|
@@ -62,6 +72,18 @@ module BBK
|
|
|
62
72
|
"#<#{self.class.name} @consumer=#{consumer.class.name}, @headers=#{headers.inspect}>"
|
|
63
73
|
end
|
|
64
74
|
|
|
75
|
+
def acked?
|
|
76
|
+
@acked
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def nacked?
|
|
80
|
+
@nacked
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def processed?
|
|
84
|
+
acked? || nacked?
|
|
85
|
+
end
|
|
86
|
+
|
|
65
87
|
end
|
|
66
88
|
end
|
|
67
89
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bbk-app
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.1.
|
|
4
|
+
version: 1.1.1.289658
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samoilenko Yuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-02-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|