evt-consumer 0.8.0.0 → 0.9.0.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: c4d4be2ff1d29dd830d043007c6112369f41dff3ab6966d22445224719c868be
4
- data.tar.gz: 4a16a984d0e2192cda71a4839206761d99e3ebb7af1d61e0ca5e94ca1fea2181
3
+ metadata.gz: 0d9bc1721e30056f0d8bf6842c29455a2612349f2e71465b50f22815f4d456a1
4
+ data.tar.gz: ccb5bef0c664c800a69cf6db33b6a2925a9178a991ae331fae6c383dc335bf63
5
5
  SHA512:
6
- metadata.gz: c01497154272cdfd2bca6818d3f028e627ba7f60fdb74193d25870bc58c8f7cd45bce82712b76a7cd090bcc2bdf6b363165f2b52fa140afa18920a4d5d10e20f
7
- data.tar.gz: c7a00242127366d1bb2f8048d7fd81cbccc7b243815204ff6442c7aa2b30776cf05dcbb71775fc62330d445db18bb5e59e1664a7a847cf4f409061d36fce68ff
6
+ metadata.gz: f8759907e1ea1c4f9ad404c651355a46b72351e001b09a665409f76121c83890fd2fb632e3257688c510cefb4ebdc868c67f63e8921236ed34adf93c6215d597
7
+ data.tar.gz: a8b8135706e07354969f325883c865eef8927c86fee7ef95ada15ae50a5a9273669a2f47e154868f39ffd428cf800db462623eb41f295b684f894bcb6d950ac2
data/lib/consumer.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'actor'
2
2
 
3
3
  require 'configure'; Configure.activate
4
- require 'cycle'
4
+ require 'poll'
5
5
  require 'messaging'
6
6
  require 'log'
7
7
 
@@ -18,8 +18,7 @@ module Consumer
18
18
  @position_update_interval ||= Defaults.position_update_interval
19
19
  end
20
20
 
21
- attr_accessor :cycle_interval_milliseconds
22
- attr_accessor :cycle_timeout_milliseconds
21
+ attr_accessor :poll_interval_milliseconds
23
22
 
24
23
  dependency :dispatch, Dispatch
25
24
  dependency :get
@@ -105,8 +104,7 @@ module Consumer
105
104
  stream_name,
106
105
  get,
107
106
  position: starting_position,
108
- cycle_interval_milliseconds: cycle_interval_milliseconds,
109
- cycle_timeout_milliseconds: cycle_timeout_milliseconds
107
+ poll_interval_milliseconds: poll_interval_milliseconds
110
108
  )
111
109
 
112
110
  handlers = self.class.handler_registry.get(self)
@@ -118,12 +116,11 @@ module Consumer
118
116
  end
119
117
 
120
118
  module Build
121
- def build(stream_name, batch_size: nil, position_store: nil, position_update_interval: nil, session: nil, cycle_timeout_milliseconds: nil, cycle_interval_milliseconds: nil, **arguments)
119
+ def build(stream_name, batch_size: nil, position_store: nil, position_update_interval: nil, session: nil, poll_interval_milliseconds: nil, **arguments)
122
120
  instance = new stream_name
123
121
 
124
122
  instance.position_update_interval = position_update_interval
125
- instance.cycle_interval_milliseconds = cycle_interval_milliseconds
126
- instance.cycle_timeout_milliseconds = cycle_timeout_milliseconds
123
+ instance.poll_interval_milliseconds = poll_interval_milliseconds
127
124
 
128
125
  instance.configure(batch_size: batch_size, position_store: position_store, session: session, **arguments)
129
126
 
@@ -1,7 +1,7 @@
1
1
  require 'messaging/controls'
2
2
 
3
3
  require 'consumer/controls/category'
4
- require 'consumer/controls/cycle'
4
+ require 'consumer/controls/poll'
5
5
  require 'consumer/controls/message_data'
6
6
  require 'consumer/controls/message_data/batch'
7
7
  require 'consumer/controls/error'
@@ -10,7 +10,7 @@ module Consumer
10
10
 
11
11
  handler Handle::Example
12
12
 
13
- def configure(session: nil, batch_size: nil, position_store: nil)
13
+ def configure(batch_size: nil, session: nil, position_store: nil, **)
14
14
  Get::Example.configure(self)
15
15
  PositionStore::Example.configure(self, position_store: position_store)
16
16
  end
@@ -1,8 +1,8 @@
1
1
  module Consumer
2
2
  module Controls
3
- module Cycle
3
+ module Poll
4
4
  def self.example
5
- ::Cycle.build(
5
+ ::Poll.build(
6
6
  interval_milliseconds: interval_milliseconds,
7
7
  timeout_milliseconds: timeout_milliseconds
8
8
  )
@@ -13,7 +13,7 @@ module Consumer
13
13
  end
14
14
 
15
15
  def self.timeout_milliseconds
16
- 11
16
+ 0
17
17
  end
18
18
  end
19
19
  end
@@ -14,20 +14,20 @@ module Consumer
14
14
  @position ||= 0
15
15
  end
16
16
 
17
- dependency :cycle, Cycle
17
+ dependency :poll, Poll
18
18
 
19
- def self.build(stream_name, get, position: nil, cycle_interval_milliseconds: nil, cycle_timeout_milliseconds: nil)
20
- cycle_interval_milliseconds ||= Defaults.cycle_interval_milliseconds
21
- cycle_timeout_milliseconds ||= Defaults.cycle_timeout_milliseconds
19
+ def self.build(stream_name, get, position: nil, poll_interval_milliseconds: nil)
20
+ poll_interval_milliseconds ||= Defaults.poll_interval_milliseconds
21
+ poll_timeout_milliseconds = Defaults.poll_timeout_milliseconds
22
22
 
23
23
  instance = new(stream_name, get)
24
24
 
25
25
  instance.position = position
26
26
 
27
- Cycle.configure(
27
+ Poll.configure(
28
28
  instance,
29
- interval_milliseconds: cycle_interval_milliseconds,
30
- timeout_milliseconds: cycle_timeout_milliseconds
29
+ interval_milliseconds: poll_interval_milliseconds,
30
+ timeout_milliseconds: poll_timeout_milliseconds
31
31
  )
32
32
 
33
33
  instance.configure
@@ -41,7 +41,7 @@ module Consumer
41
41
  handle :resupply do
42
42
  logger.trace { "Resupplying (StreamName: #{stream_name}, Position: #{position})" }
43
43
 
44
- batch = cycle.() do
44
+ batch = poll.() do
45
45
  get.(stream_name, position: position)
46
46
  end
47
47
 
@@ -1,12 +1,12 @@
1
1
  module Consumer
2
2
  class Subscription
3
3
  module Defaults
4
- def self.cycle_interval_milliseconds
4
+ def self.poll_interval_milliseconds
5
5
  100
6
6
  end
7
7
 
8
- def self.cycle_timeout_milliseconds
9
- 1000
8
+ def self.poll_timeout_milliseconds
9
+ 0
10
10
  end
11
11
  end
12
12
  end
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.8.0.0
4
+ version: 0.9.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: 2018-07-31 00:00:00.000000000 Z
11
+ date: 2018-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ntl-actor
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: evt-cycle
42
+ name: evt-poll
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -93,7 +93,6 @@ files:
93
93
  - lib/consumer/controls/category.rb
94
94
  - lib/consumer/controls/consumer.rb
95
95
  - lib/consumer/controls/consumer/incrementing.rb
96
- - lib/consumer/controls/cycle.rb
97
96
  - lib/consumer/controls/error.rb
98
97
  - lib/consumer/controls/get.rb
99
98
  - lib/consumer/controls/get/incrementing.rb
@@ -102,6 +101,7 @@ files:
102
101
  - lib/consumer/controls/identifier.rb
103
102
  - lib/consumer/controls/message_data.rb
104
103
  - lib/consumer/controls/message_data/batch.rb
104
+ - lib/consumer/controls/poll.rb
105
105
  - lib/consumer/controls/position.rb
106
106
  - lib/consumer/controls/position_store.rb
107
107
  - lib/consumer/controls/position_store/local_file.rb