karafka-core 2.0.7 → 2.0.8
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 +3 -1
- data/.github/workflows/ci.yml +3 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +7 -7
- data/config/{errors.yml → locales/errors.yml} +0 -0
- data/lib/karafka/core/helpers/time.rb +21 -0
- data/lib/karafka/core/monitoring/notifications.rb +4 -7
- data/lib/karafka/core/version.rb +1 -1
- data/lib/karafka-core.rb +2 -0
- data.tar.gz.sig +0 -0
- metadata +5 -4
- metadata.gz.sig +2 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89262ad9172da20cb645406674d90025637d7f4aea8e73379d2d39d475ed9eaf
|
4
|
+
data.tar.gz: f10d0f1748fc69859c9b1661c490304d23e8506f550eff2bc7446045d9fd2ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3042fe634fccbcbb9e9331c0fab4b6637d8077c7cbd3695aa2802aac8b2d230be21eb1093bf4803886402a0bec292bd40078a74f115a85e532470378aaf3fd31
|
7
|
+
data.tar.gz: 46d394f39d1cdecb581e92f6786ee6780b7aa3ca80815337f7638441e0b3e6ce3bb477e09a0c89bc285d77acc1803a2b0393d8b63e68c75f14be694bf1c53c11
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
�U� 4��aJ�@�H�
|
2
|
+
�Z�P&�]��o�w�<s8}^�k'l�'���Wi�;�X��É[�G��0_��㕽�#�
|
3
|
+
�����v������S ��K�@߲�R���5a�R���.�Om����"~?�kh�1������x̂�,P�.����L��-U6l�~pђ���Mɇ*4������DLe�NNp�1�n����Z���st1�D��R2,wأ����� v�:!M�Ә�#��F/���bn������lRPrAc#n/��<Z��_O��v�0�:�RvJ�����YG���;4H�&�0,ɶR����]�xA�P�����ah."�c�3l�ޑ�SUI0�j��
|
data/.github/workflows/ci.yml
CHANGED
@@ -16,11 +16,12 @@ jobs:
|
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
18
|
ruby:
|
19
|
+
- '3.2'
|
19
20
|
- '3.1'
|
20
21
|
- '3.0'
|
21
22
|
- '2.7'
|
22
23
|
include:
|
23
|
-
- ruby: '3.
|
24
|
+
- ruby: '3.2'
|
24
25
|
coverage: 'true'
|
25
26
|
steps:
|
26
27
|
- uses: actions/checkout@v3
|
@@ -54,7 +55,7 @@ jobs:
|
|
54
55
|
- name: Set up Ruby
|
55
56
|
uses: ruby/setup-ruby@v1
|
56
57
|
with:
|
57
|
-
ruby-version: 3.
|
58
|
+
ruby-version: 3.2
|
58
59
|
- name: Install latest bundler
|
59
60
|
run: gem install bundler --no-document
|
60
61
|
- name: Install Diffend plugin
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Karafka core changelog
|
2
2
|
|
3
|
+
## 2.0.8 (2023-01-07)
|
4
|
+
- Add `Karafka::Core::Helpers::Time` utility for time reporting.
|
5
|
+
|
3
6
|
## 2.0.7 (2022-12-18)
|
4
7
|
- Allow for recompilation of config upon injecting new config nodes.
|
5
8
|
- Compile given config scope automatically after it is defined.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-core (2.0.
|
4
|
+
karafka-core (2.0.8)
|
5
5
|
concurrent-ruby (>= 1.1)
|
6
6
|
rdkafka (>= 0.12)
|
7
7
|
|
@@ -22,8 +22,8 @@ GEM
|
|
22
22
|
ffi (1.15.5)
|
23
23
|
i18n (1.12.0)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
|
-
mini_portile2 (2.8.
|
26
|
-
minitest (5.
|
25
|
+
mini_portile2 (2.8.1)
|
26
|
+
minitest (5.17.0)
|
27
27
|
rake (13.0.6)
|
28
28
|
rdkafka (0.12.0)
|
29
29
|
ffi (~> 1.15)
|
@@ -35,14 +35,14 @@ GEM
|
|
35
35
|
rspec-mocks (~> 3.12.0)
|
36
36
|
rspec-core (3.12.0)
|
37
37
|
rspec-support (~> 3.12.0)
|
38
|
-
rspec-expectations (3.12.
|
38
|
+
rspec-expectations (3.12.1)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
40
|
rspec-support (~> 3.12.0)
|
41
|
-
rspec-mocks (3.12.
|
41
|
+
rspec-mocks (3.12.1)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
43
|
rspec-support (~> 3.12.0)
|
44
44
|
rspec-support (3.12.0)
|
45
|
-
simplecov (0.
|
45
|
+
simplecov (0.22.0)
|
46
46
|
docile (~> 1.1)
|
47
47
|
simplecov-html (~> 0.11)
|
48
48
|
simplecov_json_formatter (~> 0.1)
|
@@ -63,4 +63,4 @@ DEPENDENCIES
|
|
63
63
|
simplecov
|
64
64
|
|
65
65
|
BUNDLED WITH
|
66
|
-
2.
|
66
|
+
2.4.2
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Karafka
|
4
|
+
module Core
|
5
|
+
# Namespace for some small utilities used across the ecosystem
|
6
|
+
module Helpers
|
7
|
+
# Time related methods used across Karafka
|
8
|
+
module Time
|
9
|
+
# @return [Float] current monotonic time in milliseconds
|
10
|
+
def monotonic_now
|
11
|
+
::Process.clock_gettime(::Process::CLOCK_MONOTONIC) * 1_000
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Float] current time in float
|
15
|
+
def float_now
|
16
|
+
::Time.now.utc.to_f
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -9,6 +9,8 @@ module Karafka
|
|
9
9
|
# We do not use any of them by default as our use-case is fairly simple and we do not want
|
10
10
|
# to have too many external dependencies.
|
11
11
|
class Notifications
|
12
|
+
include Core::Helpers::Time
|
13
|
+
|
12
14
|
attr_reader :name
|
13
15
|
|
14
16
|
# Raised when someone wants to publish event that was not registered
|
@@ -112,14 +114,9 @@ module Karafka
|
|
112
114
|
# Measures time taken to execute a given block and returns it together with the result of
|
113
115
|
# the block execution
|
114
116
|
def measure_time_taken
|
115
|
-
start =
|
117
|
+
start = monotonic_now
|
116
118
|
result = yield
|
117
|
-
[result,
|
118
|
-
end
|
119
|
-
|
120
|
-
# @return [Integer] current monotonic time
|
121
|
-
def current_time
|
122
|
-
::Process.clock_gettime(::Process::CLOCK_MONOTONIC, :millisecond)
|
119
|
+
[result, monotonic_now - start]
|
123
120
|
end
|
124
121
|
end
|
125
122
|
end
|
data/lib/karafka/core/version.rb
CHANGED
data/lib/karafka-core.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-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
|
36
36
|
MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2023-01-07 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: concurrent-ruby
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- MIT-LICENSE
|
91
91
|
- README.md
|
92
92
|
- certs/cert_chain.pem
|
93
|
-
- config/errors.yml
|
93
|
+
- config/locales/errors.yml
|
94
94
|
- karafka-core.gemspec
|
95
95
|
- lib/karafka-core.rb
|
96
96
|
- lib/karafka/core.rb
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/karafka/core/contractable/contract.rb
|
102
102
|
- lib/karafka/core/contractable/result.rb
|
103
103
|
- lib/karafka/core/contractable/rule.rb
|
104
|
+
- lib/karafka/core/helpers/time.rb
|
104
105
|
- lib/karafka/core/instrumentation.rb
|
105
106
|
- lib/karafka/core/instrumentation/callbacks_manager.rb
|
106
107
|
- lib/karafka/core/monitoring.rb
|
@@ -137,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.4.1
|
141
142
|
signing_key:
|
142
143
|
specification_version: 4
|
143
144
|
summary: Karafka ecosystem core modules
|
metadata.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
6�$6��7[z7�%؍9�Ts���x�=;ïҧo��[���A�|x',�J���R��)Z�\l�����挏B?푹�z�������m�i
|
4
|
-
���J]L��o(Ms��4zɜ�]B>�W�N'���]d��Q�Z
|
1
|
+
�$ľsvԓ���p����y#���:�����,C��� �������y�iN�
|
2
|
+
��&���6�����_�:�g۪V_�bv�e��%�?��h1��ڬ�L��Z���y}{Dn�Ɖ9��n�<c~f�w�O�%������<�E��%ΰH�1�Gʨ@NQ�D���tWn%� ��G�H�+N�@��J�������]��A��*go�.�>��E�$�uZ��wc·7�(h2Q�纎`=���
|