karafka 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/karafka/admin.rb +1 -1
- data/lib/karafka/instrumentation/notifications.rb +1 -0
- data/lib/karafka/processing/worker.rb +5 -1
- data/lib/karafka/railtie.rb +10 -0
- data/lib/karafka/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b67a18484b250b65788db213f615b7f1304ab33d6645bceeebdf8025b54bda
|
4
|
+
data.tar.gz: 27d4ece68701b9f34266ff834c9d0809690e06b108412f68916a39880a7a23f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682a0ff35d78e9eb5590bdb32bbc14bf47f18029003286d55d1f6f14425cd3d3ad6e8081a574f3f2146bc95d9ac692e9dc82622065e6dc6f092dc3dbe61652f3
|
7
|
+
data.tar.gz: 5a4e68ea639b9261172c055e6f22a741735262eb277acd18e465c862ead0242d0287b8872d6add290af0bba681f000a328f4c16d1ee31ca9075fe880552ddf9b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
+
## 2.0.2 (2022-08-07)
|
4
|
+
- Bypass issue with Rails reload in development by releasing the connection (https://github.com/rails/rails/issues/44183).
|
5
|
+
|
3
6
|
## 2.0.1 (2022-08-06)
|
4
7
|
- Provide `Karafka::Admin` for creation and destruction of topics and fetching cluster info.
|
5
8
|
- Update integration specs to always use one-time disposable topics.
|
data/Gemfile.lock
CHANGED
data/lib/karafka/admin.rb
CHANGED
@@ -8,7 +8,7 @@ module Karafka
|
|
8
8
|
#
|
9
9
|
# @note It always uses the primary defined cluster and does not support multi-cluster work.
|
10
10
|
# If you need this, just replace the cluster info for the time you use this
|
11
|
-
|
11
|
+
module Admin
|
12
12
|
class << self
|
13
13
|
# Creates Kafka topic with given settings
|
14
14
|
#
|
@@ -46,8 +46,9 @@ module Karafka
|
|
46
46
|
def process
|
47
47
|
job = @jobs_queue.pop
|
48
48
|
|
49
|
+
instrument_details = { caller: self, job: job, jobs_queue: @jobs_queue }
|
50
|
+
|
49
51
|
if job
|
50
|
-
instrument_details = { caller: self, job: job, jobs_queue: @jobs_queue }
|
51
52
|
|
52
53
|
Karafka.monitor.instrument('worker.process', instrument_details)
|
53
54
|
|
@@ -82,6 +83,9 @@ module Karafka
|
|
82
83
|
ensure
|
83
84
|
# job can be nil when the queue is being closed
|
84
85
|
@jobs_queue.complete(job) if job
|
86
|
+
|
87
|
+
# Always publish info, that we completed all the work despite its result
|
88
|
+
Karafka.monitor.instrument('worker.completed', instrument_details)
|
85
89
|
end
|
86
90
|
end
|
87
91
|
end
|
data/lib/karafka/railtie.rb
CHANGED
@@ -77,6 +77,16 @@ if rails
|
|
77
77
|
|
78
78
|
Rails.application.reloader.reload!
|
79
79
|
end
|
80
|
+
|
81
|
+
::Karafka::App.monitor.subscribe('worker.completed') do
|
82
|
+
# Skip in case someone is using Rails without ActiveRecord
|
83
|
+
next unless Object.const_defined?('ActiveRecord::Base')
|
84
|
+
|
85
|
+
# Always release the connection after processing is done. Otherwise thread may hang
|
86
|
+
# blocking the reload and further processing
|
87
|
+
# @see https://github.com/rails/rails/issues/44183
|
88
|
+
ActiveRecord::Base.connection_pool.release_connection
|
89
|
+
end
|
80
90
|
end
|
81
91
|
|
82
92
|
initializer 'karafka.require_karafka_boot_file' do |app|
|
data/lib/karafka/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
35
35
|
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2022-08-
|
37
|
+
date: 2022-08-07 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: karafka-core
|
metadata.gz.sig
CHANGED
Binary file
|