racecar 2.9.0.beta1 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +12 -8
- data/CHANGELOG.md +5 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +34 -29
- data/README.md +7 -5
- data/lib/racecar/cli.rb +7 -1
- data/lib/racecar/config.rb +7 -0
- data/lib/racecar/consumer_set.rb +4 -1
- data/lib/racecar/daemon.rb +2 -2
- data/lib/racecar/datadog.rb +22 -1
- data/lib/racecar/delivery_callback.rb +27 -0
- data/lib/racecar/parallel_runner.rb +4 -0
- data/lib/racecar/producer.rb +18 -8
- data/lib/racecar/rebalance_listener.rb +22 -0
- data/lib/racecar/runner.rb +2 -11
- data/lib/racecar/version.rb +1 -1
- data/lib/racecar.rb +6 -2
- data/racecar.gemspec +2 -2
- metadata +9 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b394d31edcb9c83e562811ba748b6c6915388d0227a4e7425aa9aa13f64e3890
|
4
|
+
data.tar.gz: 1dfcd7046b6d932f716246d0685589c1635af115a4e126067c9775b13fe05464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59043be21e411e680c11815b583236556413a539f5aa9508a460eefe82cee6199f56a30b9fa07a3f206886d5dc811b210cea6130813a7073a68fe6612343ca0d
|
7
|
+
data.tar.gz: d6692b9bb7cdc27efe5272a10fa1d9061920084a7b517699e5133f5e31e9fd50415e72ee40550e07e5a2fed028aeabb741422fef47372c7a53e0a96bdfc1b090
|
data/.github/workflows/ci.yml
CHANGED
@@ -12,30 +12,34 @@ jobs:
|
|
12
12
|
|
13
13
|
strategy:
|
14
14
|
matrix:
|
15
|
-
ruby-version:
|
15
|
+
ruby-version:
|
16
|
+
- "2.7"
|
17
|
+
- "3.0"
|
18
|
+
- "3.1"
|
19
|
+
- "3.2"
|
16
20
|
|
17
21
|
steps:
|
18
|
-
- uses: zendesk/checkout@
|
22
|
+
- uses: zendesk/checkout@v3
|
19
23
|
- name: Set up Ruby
|
20
|
-
uses: zendesk/setup-ruby@v1
|
24
|
+
uses: zendesk/setup-ruby@v1
|
21
25
|
with:
|
22
26
|
ruby-version: ${{ matrix.ruby-version }}
|
23
27
|
bundler-cache: true
|
24
28
|
- name: Build and test with RSpec
|
25
|
-
run: bundle exec rspec --
|
29
|
+
run: bundle exec rspec --exclude-pattern='spec/integration/*_spec.rb'
|
26
30
|
|
27
31
|
integration-specs:
|
28
32
|
runs-on: ubuntu-latest
|
29
33
|
steps:
|
30
|
-
- uses: zendesk/checkout@
|
34
|
+
- uses: zendesk/checkout@v3
|
31
35
|
- name: Set up Ruby
|
32
|
-
uses: zendesk/setup-ruby@v1
|
36
|
+
uses: zendesk/setup-ruby@v1
|
33
37
|
with:
|
34
|
-
ruby-version: 2.7
|
38
|
+
ruby-version: "2.7"
|
35
39
|
bundler-cache: true
|
36
40
|
- name: Bring up docker-compose stack
|
37
41
|
run: docker-compose up -d
|
38
42
|
- name: Build and test with RSpec
|
39
43
|
env:
|
40
44
|
RACECAR_BROKERS: localhost:9092
|
41
|
-
run: timeout --kill-after 180 150 bundle exec rspec
|
45
|
+
run: timeout --kill-after 180 150 bundle exec rspec spec/integration/*_spec.rb
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -5,6 +5,6 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in racecar.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
# We actually support version
|
9
|
-
# on Ruby 2.
|
10
|
-
gem 'activesupport', '
|
8
|
+
# We actually support version 7.x (see gemspec); this extra restriction is added just for running the test suite also
|
9
|
+
# on Ruby 2.6, which activesupport 7.0 does not support.
|
10
|
+
gem 'activesupport', '~> 6.1.0'
|
data/Gemfile.lock
CHANGED
@@ -8,60 +8,65 @@ PATH
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (
|
11
|
+
activesupport (6.1.7.3)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>=
|
14
|
-
minitest (
|
15
|
-
tzinfo (~>
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
byebug (11.1.3)
|
16
18
|
coderay (1.1.3)
|
17
|
-
concurrent-ruby (1.
|
18
|
-
diff-lcs (1.
|
19
|
-
dogstatsd-ruby (5.
|
19
|
+
concurrent-ruby (1.2.2)
|
20
|
+
diff-lcs (1.5.0)
|
21
|
+
dogstatsd-ruby (5.5.0)
|
20
22
|
ffi (1.15.5)
|
21
|
-
i18n (1.
|
23
|
+
i18n (1.12.0)
|
22
24
|
concurrent-ruby (~> 1.0)
|
23
25
|
king_konf (1.0.1)
|
24
26
|
method_source (1.0.0)
|
25
27
|
mini_portile2 (2.8.1)
|
26
|
-
minitest (5.
|
27
|
-
pry (0.
|
28
|
+
minitest (5.18.0)
|
29
|
+
pry (0.14.2)
|
28
30
|
coderay (~> 1.1)
|
29
31
|
method_source (~> 1.0)
|
30
|
-
|
32
|
+
pry-byebug (3.10.1)
|
33
|
+
byebug (~> 11.0)
|
34
|
+
pry (>= 0.13, < 0.15)
|
35
|
+
rake (13.0.6)
|
31
36
|
rdkafka (0.12.0)
|
32
37
|
ffi (~> 1.15)
|
33
38
|
mini_portile2 (~> 2.6)
|
34
39
|
rake (> 12)
|
35
|
-
rspec (3.
|
36
|
-
rspec-core (~> 3.
|
37
|
-
rspec-expectations (~> 3.
|
38
|
-
rspec-mocks (~> 3.
|
39
|
-
rspec-core (3.
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-expectations (3.
|
40
|
+
rspec (3.12.0)
|
41
|
+
rspec-core (~> 3.12.0)
|
42
|
+
rspec-expectations (~> 3.12.0)
|
43
|
+
rspec-mocks (~> 3.12.0)
|
44
|
+
rspec-core (3.12.1)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-expectations (3.12.2)
|
42
47
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-mocks (3.
|
48
|
+
rspec-support (~> 3.12.0)
|
49
|
+
rspec-mocks (3.12.4)
|
45
50
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.
|
47
|
-
rspec-support (3.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
51
|
+
rspec-support (~> 3.12.0)
|
52
|
+
rspec-support (3.12.0)
|
53
|
+
timecop (0.9.6)
|
54
|
+
tzinfo (2.0.6)
|
55
|
+
concurrent-ruby (~> 1.0)
|
56
|
+
zeitwerk (2.6.7)
|
52
57
|
|
53
58
|
PLATFORMS
|
54
59
|
ruby
|
55
60
|
|
56
61
|
DEPENDENCIES
|
57
|
-
activesupport (
|
62
|
+
activesupport (~> 6.1.0)
|
58
63
|
bundler (>= 1.13, < 3)
|
59
64
|
dogstatsd-ruby (>= 4.0.0, < 6.0.0)
|
60
|
-
pry
|
65
|
+
pry-byebug
|
61
66
|
racecar!
|
62
67
|
rake (> 10.0)
|
63
68
|
rspec (~> 3.0)
|
64
69
|
timecop
|
65
70
|
|
66
71
|
BUNDLED WITH
|
67
|
-
2.
|
72
|
+
2.4.9
|
data/README.md
CHANGED
@@ -249,7 +249,8 @@ You can set message headers by passing a `headers:` option with a Hash of header
|
|
249
249
|
### Standalone Producer
|
250
250
|
|
251
251
|
Racecar provides a standalone producer to publish messages to Kafka directly from your Rails application:
|
252
|
-
|
252
|
+
|
253
|
+
```ruby
|
253
254
|
# app/controllers/comments_controller.rb
|
254
255
|
class CommentsController < ApplicationController
|
255
256
|
def create
|
@@ -263,7 +264,8 @@ end
|
|
263
264
|
```
|
264
265
|
|
265
266
|
The above example will block the server process until the message has been delivered. If you want deliveries to happen in the background in order to free up your server processes more quickly, call #deliver_async instead:
|
266
|
-
|
267
|
+
|
268
|
+
```ruby
|
267
269
|
# app/controllers/comments_controller.rb
|
268
270
|
class CommentsController < ApplicationController
|
269
271
|
def show
|
@@ -284,9 +286,9 @@ end
|
|
284
286
|
```
|
285
287
|
In addition to improving response time, delivering messages asynchronously also protects your application against Kafka availability issues -- if messages cannot be delivered, they'll be buffered for later and retried automatically.
|
286
288
|
|
287
|
-
A third method is to produce messages first (without delivering the messages to Kafka yet), and deliver them synchronously later
|
289
|
+
A third method is to produce messages first (without delivering the messages to Kafka yet), and deliver them synchronously later:
|
288
290
|
|
289
|
-
```
|
291
|
+
```ruby
|
290
292
|
# app/controllers/comments_controller.rb
|
291
293
|
class CommentsController < ApplicationController
|
292
294
|
def create
|
@@ -415,7 +417,7 @@ Racecar supports [Datadog](https://www.datadoghq.com/) monitoring integration. I
|
|
415
417
|
- `datadog_namespace` – The namespace to use for Datadog metrics.
|
416
418
|
- `datadog_tags` – Tags that should always be set on Datadog metrics.
|
417
419
|
|
418
|
-
Furthermore, there's a [standard Datadog dashboard
|
420
|
+
Furthermore, there's a [standard Datadog dashboard configuration file](https://raw.githubusercontent.com/zendesk/racecar/master/extra/datadog-dashboard.json) that you can import to get started with a Racecar dashboard for all of your consumers.
|
419
421
|
|
420
422
|
#### Consumers Without Rails
|
421
423
|
|
data/lib/racecar/cli.rb
CHANGED
@@ -19,6 +19,7 @@ module Racecar
|
|
19
19
|
@parser = build_parser
|
20
20
|
@parser.parse!(args)
|
21
21
|
@consumer_name = args.first or raise Racecar::Error, "no consumer specified"
|
22
|
+
@runner = nil
|
22
23
|
end
|
23
24
|
|
24
25
|
def run
|
@@ -65,10 +66,15 @@ module Racecar
|
|
65
66
|
end
|
66
67
|
|
67
68
|
processor = consumer_class.new
|
68
|
-
Racecar.
|
69
|
+
@runner = Racecar.runner(processor)
|
70
|
+
@runner.run
|
69
71
|
nil
|
70
72
|
end
|
71
73
|
|
74
|
+
def stop
|
75
|
+
@runner.stop
|
76
|
+
end
|
77
|
+
|
72
78
|
private
|
73
79
|
|
74
80
|
attr_reader :consumer_name
|
data/lib/racecar/config.rb
CHANGED
@@ -6,6 +6,7 @@ require "king_konf"
|
|
6
6
|
|
7
7
|
require "racecar/liveness_probe"
|
8
8
|
require "racecar/instrumenter"
|
9
|
+
require "racecar/rebalance_listener"
|
9
10
|
|
10
11
|
module Racecar
|
11
12
|
class Config < KingKonf::Config
|
@@ -227,6 +228,7 @@ module Racecar
|
|
227
228
|
end
|
228
229
|
|
229
230
|
def load_consumer_class(consumer_class)
|
231
|
+
self.consumer_class = consumer_class
|
230
232
|
self.group_id = consumer_class.group_id || self.group_id
|
231
233
|
|
232
234
|
self.group_id ||= [
|
@@ -243,6 +245,7 @@ module Racecar
|
|
243
245
|
self.fetch_messages = consumer_class.fetch_messages || self.fetch_messages
|
244
246
|
self.pidfile ||= "#{group_id}.pid"
|
245
247
|
end
|
248
|
+
attr_accessor :consumer_class
|
246
249
|
|
247
250
|
def on_error(&handler)
|
248
251
|
@error_handler = handler
|
@@ -293,6 +296,10 @@ module Racecar
|
|
293
296
|
)
|
294
297
|
end
|
295
298
|
|
299
|
+
def rebalance_listener
|
300
|
+
RebalanceListener.new(self)
|
301
|
+
end
|
302
|
+
|
296
303
|
private
|
297
304
|
|
298
305
|
def rdkafka_security_config
|
data/lib/racecar/consumer_set.rb
CHANGED
@@ -69,7 +69,10 @@ module Racecar
|
|
69
69
|
|
70
70
|
def current
|
71
71
|
@consumers[@consumer_id_iterator.peek] ||= begin
|
72
|
-
|
72
|
+
consumer_config = Rdkafka::Config.new(rdkafka_config(current_subscription))
|
73
|
+
consumer_config.consumer_rebalance_listener = @config.rebalance_listener
|
74
|
+
|
75
|
+
consumer = consumer_config.consumer
|
73
76
|
@instrumenter.instrument('join_group') do
|
74
77
|
consumer.subscribe current_subscription.topic
|
75
78
|
end
|
data/lib/racecar/daemon.rb
CHANGED
@@ -54,7 +54,7 @@ module Racecar
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def pid
|
57
|
-
if File.
|
57
|
+
if File.exist?(pidfile)
|
58
58
|
File.read(pidfile).to_i
|
59
59
|
else
|
60
60
|
nil
|
@@ -89,7 +89,7 @@ module Racecar
|
|
89
89
|
end
|
90
90
|
|
91
91
|
at_exit do
|
92
|
-
File.delete(pidfile) if File.
|
92
|
+
File.delete(pidfile) if File.exist?(pidfile)
|
93
93
|
end
|
94
94
|
rescue Errno::EEXIST
|
95
95
|
check_pid
|
data/lib/racecar/datadog.rb
CHANGED
@@ -211,6 +211,10 @@ module Racecar
|
|
211
211
|
topic: topic,
|
212
212
|
}
|
213
213
|
|
214
|
+
if event.payload.key?(:exception)
|
215
|
+
increment("producer.produce.errors", tags: tags)
|
216
|
+
end
|
217
|
+
|
214
218
|
# This gets us the write rate.
|
215
219
|
increment("producer.produce.messages", tags: tags.merge(topic: topic))
|
216
220
|
|
@@ -244,7 +248,15 @@ module Racecar
|
|
244
248
|
# Number of messages ACK'd for the topic.
|
245
249
|
increment("producer.ack.messages", tags: tags)
|
246
250
|
end
|
247
|
-
|
251
|
+
|
252
|
+
def produce_delivery_error(event)
|
253
|
+
tags = {
|
254
|
+
client: event.payload.fetch(:client_id),
|
255
|
+
}
|
256
|
+
|
257
|
+
increment("producer.produce.delivery.errors", tags: tags)
|
258
|
+
end
|
259
|
+
|
248
260
|
def produce_async(event)
|
249
261
|
client = event.payload.fetch(:client_id)
|
250
262
|
topic = event.payload.fetch(:topic)
|
@@ -256,6 +268,10 @@ module Racecar
|
|
256
268
|
topic: topic,
|
257
269
|
}
|
258
270
|
|
271
|
+
if event.payload.key?(:exception)
|
272
|
+
increment("producer.produce.errors", tags: tags)
|
273
|
+
end
|
274
|
+
|
259
275
|
# This gets us the write rate.
|
260
276
|
increment("producer.produce.messages", tags: tags.merge(topic: topic))
|
261
277
|
|
@@ -279,6 +295,11 @@ module Racecar
|
|
279
295
|
topic: topic,
|
280
296
|
}
|
281
297
|
|
298
|
+
if event.payload.key?(:exception)
|
299
|
+
increment("producer.produce.errors", tags: tags)
|
300
|
+
end
|
301
|
+
|
302
|
+
|
282
303
|
# This gets us the write rate.
|
283
304
|
increment("producer.produce.messages", tags: tags.merge(topic: topic))
|
284
305
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Racecar
|
4
|
+
class DeliveryCallback
|
5
|
+
attr_reader :instrumenter
|
6
|
+
|
7
|
+
def initialize(instrumenter:)
|
8
|
+
@instrumenter = instrumenter
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(delivery_report)
|
12
|
+
if delivery_report.error.to_i.zero?
|
13
|
+
payload = {
|
14
|
+
offset: delivery_report.offset,
|
15
|
+
partition: delivery_report.partition
|
16
|
+
}
|
17
|
+
instrumenter.instrument("acknowledged_message", payload)
|
18
|
+
else
|
19
|
+
payload = {
|
20
|
+
partition: delivery_report.partition,
|
21
|
+
exception: delivery_report.error
|
22
|
+
}
|
23
|
+
instrumenter.instrument("produce_delivery_error", payload)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/racecar/producer.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "racecar/message_delivery_error"
|
4
|
+
require "racecar/delivery_callback"
|
4
5
|
|
5
6
|
at_exit do
|
6
7
|
Racecar::Producer.shutdown!
|
@@ -42,19 +43,24 @@ module Racecar
|
|
42
43
|
}
|
43
44
|
producer_config["compression.codec"] = config.producer_compression_codec.to_s unless config.producer_compression_codec.nil?
|
44
45
|
producer_config.merge!(config.rdkafka_producer)
|
45
|
-
Rdkafka::Config.new(producer_config).producer
|
46
|
+
Rdkafka::Config.new(producer_config).producer.tap do |producer|
|
47
|
+
producer.delivery_callback = DeliveryCallback.new(instrumenter: @instrumenter)
|
48
|
+
end
|
46
49
|
end
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
|
-
|
51
|
-
# fire and forget - you won't get any guarantees or feedback from
|
53
|
+
# fire and forget - you won't get any guarantees or feedback from
|
52
54
|
# Racecar on the status of the message and it won't halt execution
|
53
55
|
# of the rest of your code.
|
54
56
|
def produce_async(value:, topic:, **options)
|
55
57
|
with_instrumentation(action: "produce_async", value: value, topic: topic, **options) do
|
56
|
-
|
57
|
-
|
58
|
+
begin
|
59
|
+
handle = internal_producer.produce(payload: value, topic: topic, **options)
|
60
|
+
@delivery_handles << handle if @batching
|
61
|
+
rescue Rdkafka::RdkafkaError => e
|
62
|
+
raise MessageDeliveryError.new(e, handle)
|
63
|
+
end
|
58
64
|
end
|
59
65
|
|
60
66
|
nil
|
@@ -63,8 +69,12 @@ module Racecar
|
|
63
69
|
# synchronous message production - will wait until the delivery handle succeeds, fails or times out.
|
64
70
|
def produce_sync(value:, topic:, **options)
|
65
71
|
with_instrumentation(action: "produce_sync", value: value, topic: topic, **options) do
|
66
|
-
|
67
|
-
|
72
|
+
begin
|
73
|
+
handle = internal_producer.produce(payload: value, topic: topic, **options)
|
74
|
+
deliver_with_error_handling(handle)
|
75
|
+
rescue Rdkafka::RdkafkaError => e
|
76
|
+
raise MessageDeliveryError.new(e, handle)
|
77
|
+
end
|
68
78
|
end
|
69
79
|
|
70
80
|
nil
|
@@ -126,4 +136,4 @@ module Racecar
|
|
126
136
|
end
|
127
137
|
end
|
128
138
|
end
|
129
|
-
end
|
139
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Racecar
|
2
|
+
class RebalanceListener
|
3
|
+
def initialize(config)
|
4
|
+
@config = config
|
5
|
+
@consumer_class = config.consumer_class
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_reader :config, :consumer_class
|
9
|
+
|
10
|
+
def on_partitions_assigned(_consumer, topic_partition_list)
|
11
|
+
consumer_class.respond_to?(:on_partitions_assigned) &&
|
12
|
+
consumer_class.on_partitions_assigned(topic_partition_list.to_h)
|
13
|
+
rescue
|
14
|
+
end
|
15
|
+
|
16
|
+
def on_partitions_revoked(_consumer, topic_partition_list)
|
17
|
+
consumer_class.respond_to?(:on_partitions_revoked) &&
|
18
|
+
consumer_class.on_partitions_revoked(topic_partition_list.to_h)
|
19
|
+
rescue
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/racecar/runner.rb
CHANGED
@@ -5,6 +5,7 @@ require "racecar/pause"
|
|
5
5
|
require "racecar/message"
|
6
6
|
require "racecar/message_delivery_error"
|
7
7
|
require "racecar/erroneous_state_error"
|
8
|
+
require "racecar/delivery_callback"
|
8
9
|
|
9
10
|
module Racecar
|
10
11
|
class Runner
|
@@ -141,7 +142,7 @@ module Racecar
|
|
141
142
|
|
142
143
|
def producer
|
143
144
|
@producer ||= Rdkafka::Config.new(producer_config).producer.tap do |producer|
|
144
|
-
producer.delivery_callback =
|
145
|
+
producer.delivery_callback = Racecar::DeliveryCallback.new(instrumenter: @instrumenter)
|
145
146
|
end
|
146
147
|
end
|
147
148
|
|
@@ -160,16 +161,6 @@ module Racecar
|
|
160
161
|
producer_config
|
161
162
|
end
|
162
163
|
|
163
|
-
def delivery_callback
|
164
|
-
->(delivery_report) do
|
165
|
-
payload = {
|
166
|
-
offset: delivery_report.offset,
|
167
|
-
partition: delivery_report.partition
|
168
|
-
}
|
169
|
-
@instrumenter.instrument("acknowledged_message", payload)
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
164
|
def install_signal_handlers
|
174
165
|
# Stop the consumer on SIGINT, SIGQUIT or SIGTERM.
|
175
166
|
trap("QUIT") { stop }
|
data/lib/racecar/version.rb
CHANGED
data/lib/racecar.rb
CHANGED
@@ -66,12 +66,16 @@ module Racecar
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def self.run(processor)
|
69
|
+
runner(processor).run
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.runner(processor)
|
69
73
|
runner = Runner.new(processor, config: config, logger: logger, instrumenter: config.instrumenter)
|
70
74
|
|
71
75
|
if config.parallel_workers && config.parallel_workers > 1
|
72
|
-
ParallelRunner.new(runner: runner, config: config, logger: logger)
|
76
|
+
ParallelRunner.new(runner: runner, config: config, logger: logger)
|
73
77
|
else
|
74
|
-
runner
|
78
|
+
runner
|
75
79
|
end
|
76
80
|
end
|
77
81
|
end
|
data/racecar.gemspec
CHANGED
@@ -26,10 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_runtime_dependency "rdkafka", "~> 0.12.0"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", [">= 1.13", "< 3"]
|
29
|
-
spec.add_development_dependency "pry"
|
29
|
+
spec.add_development_dependency "pry-byebug"
|
30
30
|
spec.add_development_dependency "rake", "> 10.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
32
|
spec.add_development_dependency "timecop"
|
33
33
|
spec.add_development_dependency "dogstatsd-ruby", ">= 4.0.0", "< 6.0.0"
|
34
|
-
spec.add_development_dependency "activesupport"
|
34
|
+
spec.add_development_dependency "activesupport"
|
35
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: racecar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.0
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: king_konf
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name: pry
|
63
|
+
name: pry-byebug
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
@@ -141,20 +141,14 @@ dependencies:
|
|
141
141
|
requirements:
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
145
|
-
- - "<"
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: '6.1'
|
144
|
+
version: '0'
|
148
145
|
type: :development
|
149
146
|
prerelease: false
|
150
147
|
version_requirements: !ruby/object:Gem::Requirement
|
151
148
|
requirements:
|
152
149
|
- - ">="
|
153
150
|
- !ruby/object:Gem::Version
|
154
|
-
version: '
|
155
|
-
- - "<"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '6.1'
|
151
|
+
version: '0'
|
158
152
|
description:
|
159
153
|
email:
|
160
154
|
- dschierbeck@zendesk.com
|
@@ -200,6 +194,7 @@ files:
|
|
200
194
|
- lib/racecar/ctl.rb
|
201
195
|
- lib/racecar/daemon.rb
|
202
196
|
- lib/racecar/datadog.rb
|
197
|
+
- lib/racecar/delivery_callback.rb
|
203
198
|
- lib/racecar/erroneous_state_error.rb
|
204
199
|
- lib/racecar/heroku.rb
|
205
200
|
- lib/racecar/instrumenter.rb
|
@@ -211,6 +206,7 @@ files:
|
|
211
206
|
- lib/racecar/pause.rb
|
212
207
|
- lib/racecar/producer.rb
|
213
208
|
- lib/racecar/rails_config_file_loader.rb
|
209
|
+
- lib/racecar/rebalance_listener.rb
|
214
210
|
- lib/racecar/runner.rb
|
215
211
|
- lib/racecar/version.rb
|
216
212
|
- racecar.gemspec
|
@@ -229,9 +225,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
225
|
version: '2.6'
|
230
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
227
|
requirements:
|
232
|
-
- - "
|
228
|
+
- - ">="
|
233
229
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
230
|
+
version: '0'
|
235
231
|
requirements: []
|
236
232
|
rubygems_version: 3.0.3.1
|
237
233
|
signing_key:
|