evt-consumer 0.6.0.0 → 0.7.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/consumer/consumer.rb +3 -33
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2475ecea2ff83320921192335e0a577a7be6c570
4
- data.tar.gz: 431e4d264dbf0e5905e38ea0fe5122ca97507ed7
3
+ metadata.gz: 98c70af795289ffc5755682def21b51f7c9d1420
4
+ data.tar.gz: c33b7a40beeea361a1a0725943ca3598ea50e617
5
5
  SHA512:
6
- metadata.gz: fe951b092065c75f0a06965e6cfb5afda86fee1c9133a1d1791c6755560cd32a483eee26db43ea9bcb7b9b6547ffdca26259dff779e4855fcaf33384440db8ec
7
- data.tar.gz: 36f378434b972906ee3abc8aaeba0aa2d0b32dab08409c5d78a314abc58ffd27a44793b20de11927a0a2a906174ae15abb9b7c6dc5d1c88204b08c8f35a2a859
6
+ metadata.gz: 1968f48adfdc6f3b74d623398a777a9192a5cd5c554cf4feb9ff5b892104b591a47eb6dab632c29265c72315bacfc23bc111577a41ae46c9c06810ddd6d05f78
7
+ data.tar.gz: cf5edc9ac04e674decf4cc0ba1aece30f9ea7145da36dc7639358de7b662ce878c51d209fa2706fbdefeb67c962432465783912af4ded5bf92d945db81a9983b
@@ -4,7 +4,6 @@ module Consumer
4
4
  include Log::Dependency
5
5
 
6
6
  extend Build
7
- extend Run
8
7
  extend Start
9
8
 
10
9
  extend HandlerMacro
@@ -43,28 +42,6 @@ module Consumer
43
42
  error_raised error, message_data
44
43
  end
45
44
 
46
- def run(&probe)
47
- threads, addresses = nil
48
-
49
- start do |_, _threads, _addresses|
50
- threads = _threads
51
- addresses = _addresses
52
- end
53
-
54
- loop do
55
- probe.(self, threads, addresses) if probe
56
- consumer.subscription.cycle { nil }
57
- end
58
-
59
- addresses.each do |address|
60
- Actor::Messaging::Send.(:stop, address)
61
- end
62
-
63
- threads.each(&:join)
64
-
65
- AsyncInvocation::Incorrect
66
- end
67
-
68
45
  def identifier
69
46
  self.class.identifier
70
47
  end
@@ -116,7 +93,7 @@ module Consumer
116
93
  end
117
94
 
118
95
  module Configure
119
- def configure(batch_size: nil, session: nil, position_store: nil)
96
+ def configure(batch_size: nil, session: nil, position_store: nil, **)
120
97
  logger.trace { "Configuring (Batch Size: #{batch_size}, Session: #{session.inspect})" }
121
98
 
122
99
  super if defined?(super)
@@ -141,23 +118,16 @@ module Consumer
141
118
  end
142
119
 
143
120
  module Build
144
- def build(stream_name, batch_size: nil, position_store: nil, position_update_interval: nil, session: nil, cycle_timeout_milliseconds: nil, cycle_maximum_milliseconds: nil)
121
+ def build(stream_name, batch_size: nil, position_store: nil, position_update_interval: nil, session: nil, cycle_timeout_milliseconds: nil, cycle_maximum_milliseconds: nil, **arguments)
145
122
  instance = new stream_name
146
123
  instance.position_update_interval = position_update_interval
147
124
  instance.cycle_maximum_milliseconds = cycle_maximum_milliseconds
148
125
  instance.cycle_timeout_milliseconds = cycle_timeout_milliseconds
149
- instance.configure(batch_size: batch_size, position_store: position_store, session: session)
126
+ instance.configure(batch_size: batch_size, position_store: position_store, session: session, **arguments)
150
127
  instance
151
128
  end
152
129
  end
153
130
 
154
- module Run
155
- def run(stream_name, **arguments, &probe)
156
- instance = build stream_name, **arguments
157
- instance.run(&probe)
158
- end
159
- end
160
-
161
131
  module Start
162
132
  def start(stream_name, **arguments, &probe)
163
133
  instance = build stream_name, **arguments
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-consumer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.0
4
+ version: 0.7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-12 00:00:00.000000000 Z
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ntl-actor
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.11
143
+ rubygems_version: 2.6.14
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Consumer library that maintains a long running subscription to an event stream