evt-consumer 0.6.0.0 → 0.7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/consumer/consumer.rb +3 -33
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98c70af795289ffc5755682def21b51f7c9d1420
|
4
|
+
data.tar.gz: c33b7a40beeea361a1a0725943ca3598ea50e617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1968f48adfdc6f3b74d623398a777a9192a5cd5c554cf4feb9ff5b892104b591a47eb6dab632c29265c72315bacfc23bc111577a41ae46c9c06810ddd6d05f78
|
7
|
+
data.tar.gz: cf5edc9ac04e674decf4cc0ba1aece30f9ea7145da36dc7639358de7b662ce878c51d209fa2706fbdefeb67c962432465783912af4ded5bf92d945db81a9983b
|
data/lib/consumer/consumer.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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
|