bbk-app 1.0.0.79514 → 1.0.0.141716

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: 05afbbf67858b46aa0d9813dfba8f333dc619f41439bb6d1edc6c7caef236190
4
- data.tar.gz: 771280bde94067b95a1d0aa8039f11274f72e0ff77a4962ea9422be03046f8d7
3
+ metadata.gz: ddd13011788fd70fb38bb3d91d436cea5a602d2d74be9780759a6a8df4378b78
4
+ data.tar.gz: 2819543d3971764f12bcca9554a18ac715477815a27d539bd6f942e3263e45c5
5
5
  SHA512:
6
- metadata.gz: 75db2d1edb74285ac2f47430bedb000bd59878fcc44b4d7ff1767b57b6e4d215ef23818584a1c3a2ff743e92fc403407b0f8429ec11f1c796e05e16beba887c5
7
- data.tar.gz: c2078bf8fc7eefa645160398a5fdc24f071bf3ec87e653af8ea67fabeeba613b6e8a9eed4c8c48d49e66ad2e9d91f8d1746c5a27c1a7f86c5342c07e448ef7c9
6
+ metadata.gz: f07b3488745b25b86e82e2472de8678e05f0772c805a2e9e0d0faab087620ea90e6f29e7a65911955a51925c01aed4adc422a353d716cef59070a33365670706
7
+ data.tar.gz: 8511a776aa500dfa4fdec5638d04070c7bd869227f413e3b0fdcc30b8d33ab9b272eced03c3b3a79f289c28ce9916c5baccddfcbf0be6b595b3a787fd569bf39
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bbk-app (1.0.0.79514)
4
+ bbk-app (1.0.0.141716)
5
5
  activesupport
6
6
  bbk-utils (> 1.0.1)
7
7
  timeouter
@@ -29,8 +29,8 @@ GEM
29
29
  descendants_tracker (~> 0.0.4)
30
30
  ice_nine (~> 0.11.0)
31
31
  thread_safe (~> 0.3, >= 0.3.1)
32
- bbk-utils (1.0.1.72916)
33
- activesupport (~> 6.0)
32
+ bbk-utils (1.0.1.136047)
33
+ activesupport (>= 6.0)
34
34
  russian
35
35
  bunny (2.19.0)
36
36
  amq-protocol (~> 2.3, >= 2.3.1)
@@ -116,12 +116,16 @@ module BBK
116
116
  end
117
117
  end
118
118
 
119
+ def execute_message(message)
120
+ build_processing_stack.call(message).select do |r|
121
+ r.is_a?(BBK::App::Dispatcher::Result)
122
+ end
123
+ end
124
+
119
125
  protected
120
126
 
121
127
  def process(message)
122
- results = build_processing_stack.call(message).select do |e|
123
- e.is_a? BBK::App::Dispatcher::Result
124
- end
128
+ results = execute_message(message)
125
129
  logger.debug "There are #{results.count} results to send from #{message.headers[:message_id]}..."
126
130
  send_results(message, results).value
127
131
  rescue StandardError => e
@@ -160,7 +164,7 @@ module BBK
160
164
 
161
165
  def build_processing_stack
162
166
  stack = proc{|msg| process_message(msg) }
163
- middlewares.reduce(stack) do |stack, middleware|
167
+ middlewares.reverse.reduce(stack) do |stack, middleware|
164
168
  if middleware.respond_to?(:build)
165
169
  middleware.build(stack)
166
170
  else
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.0.0.79514
4
+ version: 1.0.0.141716
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samoilenko Yuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport