karafka-sidekiq-backend 1.3.1 → 1.4.3
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/.diffend.yml +3 -0
- data/.github/workflows/ci.yml +25 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +81 -91
- data/MIT-LICENSE +18 -0
- data/README.md +22 -21
- data/certs/mensfeld.pem +21 -21
- data/karafka-sidekiq-backend.gemspec +6 -5
- data/lib/karafka/backends/sidekiq.rb +2 -2
- data/lib/karafka/base_worker.rb +2 -1
- data/lib/karafka/extensions/{metadata_builder.rb → batch_metadata_builder.rb} +7 -5
- data/lib/karafka/extensions/params_batch_builder.rb +2 -2
- data/lib/karafka/extensions/params_builder.rb +8 -3
- data/lib/karafka/extensions/sidekiq_topic_attributes.rb +2 -2
- data/lib/karafka/extensions/stdout_listener.rb +2 -2
- data/lib/karafka/interchanger.rb +7 -3
- data/lib/karafka_sidekiq_backend.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +35 -34
- metadata.gz.sig +0 -0
- data/.github/FUNDING.yml +0 -1
- data/LICENSE +0 -165
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df894f5849e760cf4fc34d38606fed44f0fef045336fd316b5a67af6f949a264
|
4
|
+
data.tar.gz: d2f26478a4ce8ff38423faf55874ed6f5127ce2895dd8907fc0559f008f8564c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fe7c353bce5b28ab7abf84136d7a0550387627a036c4a9f90e8bd567441931c765f48781f282cc74a0f47f23df91c80b605f614bcfab917ccd2c002a8471cfa
|
7
|
+
data.tar.gz: 1d7764a08a7c407457762acb6c84110c5ef43cd3f630d7d89d284629cb76d2bf0bfef98bf3587020c3ce640b85428b27830bb86737569a29cf946d4211b848b9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.diffend.yml
ADDED
data/.github/workflows/ci.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
name: ci
|
2
2
|
|
3
3
|
on:
|
4
|
+
pull_request:
|
4
5
|
push:
|
5
6
|
schedule:
|
6
7
|
- cron: '0 1 * * *'
|
@@ -8,15 +9,17 @@ on:
|
|
8
9
|
jobs:
|
9
10
|
specs:
|
10
11
|
runs-on: ubuntu-latest
|
12
|
+
needs: diffend
|
11
13
|
strategy:
|
12
14
|
fail-fast: false
|
13
15
|
matrix:
|
14
16
|
ruby:
|
17
|
+
- '3.0'
|
15
18
|
- '2.7'
|
16
19
|
- '2.6'
|
17
|
-
- '
|
20
|
+
- 'jruby-9.3.1.0'
|
18
21
|
include:
|
19
|
-
- ruby: '
|
22
|
+
- ruby: '3.0'
|
20
23
|
coverage: 'true'
|
21
24
|
steps:
|
22
25
|
- uses: actions/checkout@v2
|
@@ -36,6 +39,26 @@ jobs:
|
|
36
39
|
env:
|
37
40
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
38
41
|
run: bundle exec rspec
|
42
|
+
|
43
|
+
diffend:
|
44
|
+
runs-on: ubuntu-latest
|
45
|
+
strategy:
|
46
|
+
fail-fast: false
|
47
|
+
steps:
|
48
|
+
- uses: actions/checkout@v2
|
49
|
+
with:
|
50
|
+
fetch-depth: 0
|
51
|
+
- name: Set up Ruby
|
52
|
+
uses: ruby/setup-ruby@v1
|
53
|
+
with:
|
54
|
+
ruby-version: 3.0
|
55
|
+
- name: Install latest bundler
|
56
|
+
run: gem install bundler --no-document
|
57
|
+
- name: Install Diffend plugin
|
58
|
+
run: bundle plugin install diffend
|
59
|
+
- name: Bundle Secure
|
60
|
+
run: bundle secure
|
61
|
+
|
39
62
|
coditsu:
|
40
63
|
runs-on: ubuntu-latest
|
41
64
|
strategy:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Karafka Sidekiq Backend
|
2
2
|
|
3
|
+
## 1.4.3 (2021-12-05)
|
4
|
+
- Source code metadata url added to the gemspec
|
5
|
+
|
6
|
+
## 1.4.2 (2021-04-21)
|
7
|
+
- Remove Ruby 2.5 support and update minimum Ruby requirement to 2.6
|
8
|
+
|
9
|
+
## 1.4.1 (2020-27-10)
|
10
|
+
- Corrected interchanger documentation (Jack12816)
|
11
|
+
- Corrected the interchanger key reference (Jack12816)
|
12
|
+
|
13
|
+
## 1.4.0 (2020-09-05)
|
14
|
+
- Update to match Karafka 1.4.0 params and batch metadata setup
|
15
|
+
|
3
16
|
## 1.3.1 (2020-04-27)
|
4
17
|
- Ruby 2.6.5 support
|
5
18
|
- Ruby 2.7.1 support
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,131 +1,121 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-sidekiq-backend (1.3
|
5
|
-
karafka (~> 1.
|
4
|
+
karafka-sidekiq-backend (1.4.3)
|
5
|
+
karafka (~> 1.4.0)
|
6
6
|
sidekiq (>= 4.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
concurrent-ruby (1.1.
|
12
|
-
connection_pool (2.2.
|
13
|
-
delivery_boy (1.0
|
14
|
-
king_konf (~> 0
|
11
|
+
concurrent-ruby (1.1.9)
|
12
|
+
connection_pool (2.2.5)
|
13
|
+
delivery_boy (1.1.0)
|
14
|
+
king_konf (~> 1.0)
|
15
15
|
ruby-kafka (~> 1.0)
|
16
|
-
diff-lcs (1.
|
17
|
-
digest-crc (0.
|
18
|
-
|
19
|
-
|
16
|
+
diff-lcs (1.4.4)
|
17
|
+
digest-crc (0.6.4)
|
18
|
+
rake (>= 12.0.0, < 14.0.0)
|
19
|
+
docile (1.4.0)
|
20
|
+
dry-configurable (0.13.0)
|
20
21
|
concurrent-ruby (~> 1.0)
|
21
|
-
dry-core (~> 0.
|
22
|
-
|
23
|
-
dry-container (0.7.2)
|
22
|
+
dry-core (~> 0.6)
|
23
|
+
dry-container (0.9.0)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
|
-
dry-configurable (~> 0.
|
26
|
-
dry-core (0.
|
25
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
26
|
+
dry-core (0.7.1)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
|
-
dry-
|
29
|
-
dry-events (0.2.0)
|
28
|
+
dry-events (0.3.0)
|
30
29
|
concurrent-ruby (~> 1.0)
|
31
|
-
dry-core (~> 0.
|
32
|
-
|
33
|
-
dry-
|
34
|
-
dry-
|
35
|
-
dry-logic (1.0.6)
|
30
|
+
dry-core (~> 0.5, >= 0.5)
|
31
|
+
dry-inflector (0.2.1)
|
32
|
+
dry-initializer (3.0.4)
|
33
|
+
dry-logic (1.2.0)
|
36
34
|
concurrent-ruby (~> 1.0)
|
37
|
-
dry-core (~> 0.
|
38
|
-
|
39
|
-
|
40
|
-
dry-
|
41
|
-
dry-core (~> 0.4)
|
42
|
-
dry-equalizer (~> 0.2)
|
35
|
+
dry-core (~> 0.5, >= 0.5)
|
36
|
+
dry-monitor (0.5.0)
|
37
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
38
|
+
dry-core (~> 0.5, >= 0.5)
|
43
39
|
dry-events (~> 0.2)
|
44
|
-
dry-schema (1.
|
40
|
+
dry-schema (1.8.0)
|
45
41
|
concurrent-ruby (~> 1.0)
|
46
|
-
dry-configurable (~> 0.
|
47
|
-
dry-core (~> 0.
|
48
|
-
dry-equalizer (~> 0.2)
|
42
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
43
|
+
dry-core (~> 0.5, >= 0.5)
|
49
44
|
dry-initializer (~> 3.0)
|
50
45
|
dry-logic (~> 1.0)
|
51
|
-
dry-types (~> 1.
|
52
|
-
dry-types (1.
|
46
|
+
dry-types (~> 1.5)
|
47
|
+
dry-types (1.5.1)
|
53
48
|
concurrent-ruby (~> 1.0)
|
54
49
|
dry-container (~> 0.3)
|
55
|
-
dry-core (~> 0.
|
56
|
-
dry-equalizer (~> 0.3)
|
50
|
+
dry-core (~> 0.5, >= 0.5)
|
57
51
|
dry-inflector (~> 0.1, >= 0.1.2)
|
58
52
|
dry-logic (~> 1.0, >= 1.0.2)
|
59
|
-
dry-validation (1.
|
53
|
+
dry-validation (1.7.0)
|
60
54
|
concurrent-ruby (~> 1.0)
|
61
55
|
dry-container (~> 0.7, >= 0.7.1)
|
62
|
-
dry-core (~> 0.
|
63
|
-
dry-equalizer (~> 0.2)
|
56
|
+
dry-core (~> 0.5, >= 0.5)
|
64
57
|
dry-initializer (~> 3.0)
|
65
|
-
dry-schema (~> 1.
|
66
|
-
envlogic (1.1.
|
58
|
+
dry-schema (~> 1.8, >= 1.8.0)
|
59
|
+
envlogic (1.1.4)
|
67
60
|
dry-inflector (~> 0.1)
|
68
|
-
io-console (0.5.
|
69
|
-
irb (1.
|
70
|
-
reline (>= 0.
|
71
|
-
karafka (1.
|
72
|
-
dry-configurable (~> 0.
|
73
|
-
dry-inflector (~> 0.
|
74
|
-
dry-monitor (~> 0.
|
75
|
-
dry-validation (~> 1.
|
61
|
+
io-console (0.5.9)
|
62
|
+
irb (1.3.7)
|
63
|
+
reline (>= 0.2.7)
|
64
|
+
karafka (1.4.11)
|
65
|
+
dry-configurable (~> 0.13)
|
66
|
+
dry-inflector (~> 0.2)
|
67
|
+
dry-monitor (~> 0.5)
|
68
|
+
dry-validation (~> 1.7)
|
76
69
|
envlogic (~> 1.1)
|
77
|
-
irb (~> 1.
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
rack-protection (2.0.8.1)
|
88
|
-
rack
|
89
|
-
rake (13.0.1)
|
90
|
-
redis (4.1.3)
|
91
|
-
reline (0.1.4)
|
70
|
+
irb (~> 1.3)
|
71
|
+
ruby-kafka (>= 1.3.0)
|
72
|
+
thor (>= 1.1)
|
73
|
+
waterdrop (~> 1.4)
|
74
|
+
zeitwerk (~> 2.4)
|
75
|
+
king_konf (1.0.0)
|
76
|
+
rack (2.2.3)
|
77
|
+
rake (13.0.6)
|
78
|
+
redis (4.5.1)
|
79
|
+
reline (0.2.7)
|
92
80
|
io-console (~> 0.5)
|
93
|
-
rspec (3.
|
94
|
-
rspec-core (~> 3.
|
95
|
-
rspec-expectations (~> 3.
|
96
|
-
rspec-mocks (~> 3.
|
97
|
-
rspec-core (3.
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-expectations (3.
|
81
|
+
rspec (3.10.0)
|
82
|
+
rspec-core (~> 3.10.0)
|
83
|
+
rspec-expectations (~> 3.10.0)
|
84
|
+
rspec-mocks (~> 3.10.0)
|
85
|
+
rspec-core (3.10.1)
|
86
|
+
rspec-support (~> 3.10.0)
|
87
|
+
rspec-expectations (3.10.1)
|
100
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
101
|
-
rspec-support (~> 3.
|
102
|
-
rspec-mocks (3.
|
89
|
+
rspec-support (~> 3.10.0)
|
90
|
+
rspec-mocks (3.10.2)
|
103
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
104
|
-
rspec-support (~> 3.
|
105
|
-
rspec-support (3.
|
106
|
-
ruby-kafka (1.
|
92
|
+
rspec-support (~> 3.10.0)
|
93
|
+
rspec-support (3.10.3)
|
94
|
+
ruby-kafka (1.4.0)
|
107
95
|
digest-crc
|
108
|
-
sidekiq (6.
|
96
|
+
sidekiq (6.3.1)
|
109
97
|
connection_pool (>= 2.2.2)
|
110
98
|
rack (~> 2.0)
|
111
|
-
|
112
|
-
|
113
|
-
simplecov (0.18.5)
|
99
|
+
redis (>= 4.2.0)
|
100
|
+
simplecov (0.21.2)
|
114
101
|
docile (~> 1.1)
|
115
102
|
simplecov-html (~> 0.11)
|
116
|
-
|
117
|
-
|
118
|
-
|
103
|
+
simplecov_json_formatter (~> 0.1)
|
104
|
+
simplecov-html (0.12.3)
|
105
|
+
simplecov_json_formatter (0.1.3)
|
106
|
+
thor (1.1.0)
|
107
|
+
waterdrop (1.4.4)
|
119
108
|
delivery_boy (>= 0.2, < 2.x)
|
120
|
-
dry-configurable (~> 0.
|
121
|
-
dry-monitor (~> 0.
|
122
|
-
dry-validation (~> 1.
|
123
|
-
ruby-kafka (>=
|
124
|
-
zeitwerk (~> 2.
|
125
|
-
zeitwerk (2.
|
109
|
+
dry-configurable (~> 0.13)
|
110
|
+
dry-monitor (~> 0.5)
|
111
|
+
dry-validation (~> 1.7)
|
112
|
+
ruby-kafka (>= 1.3.0)
|
113
|
+
zeitwerk (~> 2.4)
|
114
|
+
zeitwerk (2.5.1)
|
126
115
|
|
127
116
|
PLATFORMS
|
128
|
-
|
117
|
+
x86_64-darwin
|
118
|
+
x86_64-linux
|
129
119
|
|
130
120
|
DEPENDENCIES
|
131
121
|
karafka-sidekiq-backend!
|
@@ -133,4 +123,4 @@ DEPENDENCIES
|
|
133
123
|
simplecov
|
134
124
|
|
135
125
|
BUNDLED WITH
|
136
|
-
2.
|
126
|
+
2.2.32
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
2
|
+
a copy of this software and associated documentation files (the
|
3
|
+
"Software"), to deal in the Software without restriction, including
|
4
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
5
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
6
|
+
permit persons to whom the Software is furnished to do so, subject to
|
7
|
+
the following conditions:
|
8
|
+
|
9
|
+
The above copyright notice and this permission notice shall be
|
10
|
+
included in all copies or substantial portions of the Software.
|
11
|
+
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
13
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
14
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
15
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
16
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
17
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
18
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
# Karafka Sidekiq Backend
|
2
2
|
|
3
|
+
## Deprecation notice
|
4
|
+
|
5
|
+
This backend was designed to compensate for lack of multi-threading in Karafka. After Karafka `2.0` release, this backend development won't be continued.
|
6
|
+
|
7
|
+
We will **still** support it for Karafka `1.4` but it won't work with Karafka `2.0`. We will however provide an extensive guide on how you can achieve similar functionality with Sidekiq yourself.
|
8
|
+
|
9
|
+
## About
|
10
|
+
|
3
11
|
[![Build Status](https://github.com/karafka/sidekiq-backend/workflows/ci/badge.svg)](https://github.com/karafka/sidekiq-backend/actions?query=workflow%3Aci)
|
4
|
-
[![
|
12
|
+
[![Gem Version](https://badge.fury.io/rb/karafka-sidekiq-backend.svg)](http://badge.fury.io/rb/karafka-sidekiq-backend)
|
13
|
+
[![Join the chat at https://slack.karafka.io](https://raw.githubusercontent.com/karafka/misc/master/slack.svg)](https://slack.karafka.io)
|
5
14
|
|
6
15
|
[Karafka Sidekiq Backend](https://github.com/karafka/sidekiq-backend) provides support for consuming (processing) received Kafka messages inside of Sidekiq workers.
|
7
16
|
|
@@ -48,7 +57,7 @@ App.routes.draw do
|
|
48
57
|
backend :sidekiq
|
49
58
|
consumer Videos::DetailsConsumer
|
50
59
|
worker Workers::DetailsWorker
|
51
|
-
interchanger Interchangers::MyCustomInterchanger
|
60
|
+
interchanger Interchangers::MyCustomInterchanger.new
|
52
61
|
end
|
53
62
|
end
|
54
63
|
end
|
@@ -63,7 +72,7 @@ There are two options you can set inside of the ```topic``` block:
|
|
63
72
|
| Option | Value type | Description |
|
64
73
|
|--------------|------------|-------------------------------------------------------------------------------------------------------------------|
|
65
74
|
| worker | Class | Name of a worker class that we want to use to schedule perform code |
|
66
|
-
| interchanger |
|
75
|
+
| interchanger | Instance | Instance of an interchanger class that we want to use to pass the incoming data to Sidekiq |
|
67
76
|
|
68
77
|
|
69
78
|
### Workers
|
@@ -101,7 +110,7 @@ App.routes.draw do
|
|
101
110
|
consumer_group :videos_consumer do
|
102
111
|
topic :binary_video_details do
|
103
112
|
consumer Videos::DetailsConsumer
|
104
|
-
interchanger Interchangers::MyCustomInterchanger
|
113
|
+
interchanger Interchangers::MyCustomInterchanger.new
|
105
114
|
end
|
106
115
|
end
|
107
116
|
end
|
@@ -109,17 +118,13 @@ end
|
|
109
118
|
Each custom interchanger should define `encode` to encode params before they get stored in Redis, and `decode` to convert the params to hash format, as shown below:
|
110
119
|
|
111
120
|
```ruby
|
112
|
-
class Base64Interchanger
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
# in sidekiq later
|
117
|
-
Base64.encode64(Marshal.dump(params_batch.to_a))
|
118
|
-
end
|
121
|
+
class Base64Interchanger < ::Karafka::Interchanger
|
122
|
+
def encode(params_batch)
|
123
|
+
Base64.encode64(Marshal.dump(super))
|
124
|
+
end
|
119
125
|
|
120
|
-
|
121
|
-
|
122
|
-
end
|
126
|
+
def decode(params_string)
|
127
|
+
Marshal.load(Base64.decode64(super))
|
123
128
|
end
|
124
129
|
end
|
125
130
|
|
@@ -135,12 +140,8 @@ end
|
|
135
140
|
|
136
141
|
## Note on contributions
|
137
142
|
|
138
|
-
First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
|
139
|
-
|
140
|
-
Each pull request must pass all the RSpec specs and meet our quality requirements.
|
141
|
-
|
142
|
-
To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
|
143
|
+
First, thank you for considering contributing to the Karafka ecosystem! It's people like you that make the open source community such a great community!
|
143
144
|
|
144
|
-
|
145
|
+
Each pull request must pass all the RSpec specs, integration tests and meet our quality requirements.
|
145
146
|
|
146
|
-
|
147
|
+
Fork it, update and wait for the Github Actions results.
|
data/certs/mensfeld.pem
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjEwODExMTQxNTEzWhcNMjIwODExMTQx
|
4
|
+
NTEzWjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
5
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDV2jKH4Ti87GM6nyT6D+ESzTI0MZDj
|
6
|
+
ak2/TEwnxvijMJyCCPKT/qIkbW4/f0VHM4rhPr1nW73sb5SZBVFCLlJcOSKOBdUY
|
7
|
+
TMY+SIXN2EtUaZuhAOe8LxtxjHTgRHvHcqUQMBENXTISNzCo32LnUxweu66ia4Pd
|
8
|
+
1mNRhzOqNv9YiBZvtBf7IMQ+sYdOCjboq2dlsWmJiwiDpY9lQBTnWORnT3mQxU5x
|
9
|
+
vPSwnLB854cHdCS8fQo4DjeJBRZHhEbcE5sqhEMB3RZA3EtFVEXOxlNxVTS3tncI
|
10
|
+
qyNXiWDaxcipaens4ObSY1C2HTV7OWb7OMqSCIybeYTSfkaSdqmcl4S6zxXkjH1J
|
11
|
+
tnjayAVzD+QVXGijsPLE2PFnJAh9iDET2cMsjabO1f6l1OQNyAtqpcyQcgfnyW0z
|
12
|
+
g7tGxTYD+6wJHffM9d9txOUw6djkF6bDxyqB8lo4Z3IObCx18AZjI9XPS9QG7w6q
|
13
|
+
LCWuMG2lkCcRgASqaVk9fEf9yMc2xxz5o3kCAwEAAaN3MHUwCQYDVR0TBAIwADAL
|
14
|
+
BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFBqUFCKCOe5IuueUVqOB991jyCLLMB0GA1Ud
|
15
15
|
EQQWMBSBEm1hY2llakBtZW5zZmVsZC5wbDAdBgNVHRIEFjAUgRJtYWNpZWpAbWVu
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBADD0/UuTTFgW+CGk2U0RDw2RBOca
|
17
|
+
W2LTF/G7AOzuzD0Tc4voc7WXyrgKwJREv8rgBimLnNlgmFJLmtUCh2U/MgxvcilH
|
18
|
+
yshYcbseNvjkrtYnLRlWZR4SSB6Zei5AlyGVQLPkvdsBpNegcG6w075YEwzX/38a
|
19
|
+
8V9B/Yri2OGELBz8ykl7BsXUgNoUPA/4pHF6YRLz+VirOaUIQ4JfY7xGj6fSOWWz
|
20
|
+
/rQ/d77r6o1mfJYM/3BRVg73a3b7DmRnE5qjwmSaSQ7u802pJnLesmArch0xGCT/
|
21
|
+
fMmRli1Qb+6qOTl9mzD6UDMAyFR4t6MStLm0mIEqM0nBO5nUdUWbC7l9qXEf8XBE
|
22
|
+
2DP28p3EqSuS+lKbAWKcqv7t0iRhhmaod+Yn9mcrLN1sa3q3KSQ9BCyxezCD4Mk2
|
23
|
+
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
24
|
+
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
25
25
|
-----END CERTIFICATE-----
|
@@ -9,15 +9,15 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = Karafka::Backends::Sidekiq::VERSION
|
10
10
|
spec.platform = Gem::Platform::RUBY
|
11
11
|
spec.authors = ['Maciej Mensfeld']
|
12
|
-
spec.email = %w[maciej@
|
13
|
-
spec.homepage = 'https://
|
12
|
+
spec.email = %w[maciej@mensfeld.pl]
|
13
|
+
spec.homepage = 'https://karafka.io'
|
14
14
|
spec.summary = 'Karafka Sidekiq backend for background messages processing'
|
15
15
|
spec.description = 'Karafka Sidekiq backend for background messages processing'
|
16
|
-
spec.license = '
|
16
|
+
spec.license = 'MIT'
|
17
17
|
|
18
|
-
spec.add_dependency 'karafka', '~> 1.
|
18
|
+
spec.add_dependency 'karafka', '~> 1.4.0'
|
19
19
|
spec.add_dependency 'sidekiq', '>= 4.2'
|
20
|
-
spec.required_ruby_version = '>= 2.
|
20
|
+
spec.required_ruby_version = '>= 2.6.0'
|
21
21
|
|
22
22
|
if $PROGRAM_NAME.end_with?('gem')
|
23
23
|
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem')
|
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
28
28
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = %w[lib]
|
30
|
+
spec.metadata = { 'source_code_uri' => 'https://github.com/karafka/sidekiq-backend' }
|
30
31
|
end
|
@@ -6,7 +6,7 @@ module Karafka
|
|
6
6
|
# Sidekiq backend that schedules stuff to Sidekiq worker for delayed execution
|
7
7
|
module Sidekiq
|
8
8
|
# Karafka Sidekiq backend version
|
9
|
-
VERSION = '1.3
|
9
|
+
VERSION = '1.4.3'
|
10
10
|
|
11
11
|
# Enqueues the execution of perform method into a worker.
|
12
12
|
# @note Each worker needs to have a class #perform_async method that will allow us to pass
|
@@ -18,7 +18,7 @@ module Karafka
|
|
18
18
|
topic.worker.perform_async(
|
19
19
|
topic.id,
|
20
20
|
topic.interchanger.encode(params_batch),
|
21
|
-
respond_to?(:
|
21
|
+
respond_to?(:batch_metadata) ? batch_metadata.to_h : nil
|
22
22
|
)
|
23
23
|
end
|
24
24
|
end
|
data/lib/karafka/base_worker.rb
CHANGED
@@ -19,6 +19,7 @@ module Karafka
|
|
19
19
|
# @param subclass [Class] subclass of the worker
|
20
20
|
# @return [Class] subclass of the worker that was selected
|
21
21
|
def inherited(subclass)
|
22
|
+
super
|
22
23
|
@inherited ||= subclass
|
23
24
|
end
|
24
25
|
end
|
@@ -54,7 +55,7 @@ module Karafka
|
|
54
55
|
)
|
55
56
|
|
56
57
|
if topic.batch_fetching
|
57
|
-
consumer.
|
58
|
+
consumer.batch_metadata = Params::Builders::BatchMetadata.from_hash(
|
58
59
|
metadata,
|
59
60
|
topic
|
60
61
|
)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Karafka
|
4
4
|
module Extensions
|
5
5
|
# Extension for metadata builder to allow building metadata from a hash
|
6
|
-
module
|
6
|
+
module BatchMetadataBuilder
|
7
7
|
# Builds metadata from hash
|
8
8
|
# @param hash [Hash] hash with metadata
|
9
9
|
# @param topic [Karafka::Routing::Topic] topic instance
|
@@ -11,10 +11,12 @@ module Karafka
|
|
11
11
|
def from_hash(hash, topic)
|
12
12
|
# Parser needs to be merged as this is the only non-serializable object
|
13
13
|
# so it gets reconstructed from the topic
|
14
|
-
Karafka::Params::
|
15
|
-
.new
|
16
|
-
|
17
|
-
|
14
|
+
Karafka::Params::BatchMetadata
|
15
|
+
.new(
|
16
|
+
**hash
|
17
|
+
.merge('deserializer' => topic.deserializer)
|
18
|
+
.transform_keys(&:to_sym)
|
19
|
+
)
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -10,11 +10,11 @@ module Karafka
|
|
10
10
|
# @return [Karafka::Params::ParamsBatch] built batch
|
11
11
|
# @note We rebuild the params batch from array after the serialization
|
12
12
|
def from_array(array, topic)
|
13
|
-
params_array = array.map
|
13
|
+
params_array = array.map do |hash|
|
14
14
|
Karafka::Params::Builders::Params.from_hash(hash, topic)
|
15
15
|
end
|
16
16
|
|
17
|
-
Karafka::Params::ParamsBatch.new(params_array)
|
17
|
+
Karafka::Params::ParamsBatch.new(params_array).freeze
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -9,10 +9,15 @@ module Karafka
|
|
9
9
|
# @param topic [Karafka::Routing::Topic] topic for which we build the params
|
10
10
|
# @return [Karafka::Params::Params] built params
|
11
11
|
def from_hash(hash, topic)
|
12
|
+
metadata = Karafka::Params::Metadata.new(
|
13
|
+
**hash
|
14
|
+
.fetch('metadata')
|
15
|
+
.merge('deserializer' => topic.deserializer)
|
16
|
+
.transform_keys(&:to_sym)
|
17
|
+
).freeze
|
18
|
+
|
12
19
|
Karafka::Params::Params
|
13
|
-
.new
|
14
|
-
.merge!(hash)
|
15
|
-
.merge!('deserializer' => topic.deserializer)
|
20
|
+
.new(hash.fetch('raw_payload'), metadata)
|
16
21
|
end
|
17
22
|
end
|
18
23
|
end
|
@@ -11,8 +11,8 @@ module Karafka
|
|
11
11
|
@worker ||= backend == :sidekiq ? Karafka::Workers::Builder.new(consumer).build : nil
|
12
12
|
end
|
13
13
|
|
14
|
-
# @return [
|
15
|
-
# params between Karafka server and Karafka background job
|
14
|
+
# @return [#encode, #decode] Interchanger instance (not a class) that we want to use to
|
15
|
+
# interchange params between Karafka server and Karafka background job
|
16
16
|
def interchanger
|
17
17
|
@interchanger ||= Karafka::Interchanger.new
|
18
18
|
end
|
@@ -8,7 +8,7 @@ module Karafka
|
|
8
8
|
# Logs info about scheduling of a certain dataset with a Sidekiq backend
|
9
9
|
# @param event [Dry::Events::Event] event details including payload
|
10
10
|
def on_backends_sidekiq_process(event)
|
11
|
-
count = event[:caller].send(:params_batch).
|
11
|
+
count = event[:caller].send(:params_batch).size
|
12
12
|
topic = event[:caller].topic.name
|
13
13
|
time = event[:time]
|
14
14
|
info "Scheduling of #{count} messages to Sidekiq on topic #{topic} took #{time} ms"
|
@@ -17,7 +17,7 @@ module Karafka
|
|
17
17
|
# Logs ino about processing certain events with a given Sidekiq worker
|
18
18
|
# @param event [Dry::Events::Event] event details including payload
|
19
19
|
def on_backends_sidekiq_base_worker_perform(event)
|
20
|
-
count = event[:consumer].send(:params_batch).
|
20
|
+
count = event[:consumer].send(:params_batch).size
|
21
21
|
topic = event[:consumer].topic.name
|
22
22
|
time = event[:time]
|
23
23
|
info "Sidekiq processing of topic #{topic} with #{count} messages took #{time} ms"
|
data/lib/karafka/interchanger.rb
CHANGED
@@ -11,10 +11,14 @@ module Karafka
|
|
11
11
|
# This interchanger uses default Sidekiq options to exchange data
|
12
12
|
class Interchanger
|
13
13
|
# @param params_batch [Karafka::Params::ParamsBatch] Karafka params batch object
|
14
|
-
# @return [Array<
|
15
|
-
# be serialized using Sidekiq serialization engine
|
14
|
+
# @return [Array<Hash>] Array with hash built out of params data
|
16
15
|
def encode(params_batch)
|
17
|
-
params_batch.
|
16
|
+
params_batch.map do |param|
|
17
|
+
{
|
18
|
+
'raw_payload' => param.raw_payload,
|
19
|
+
'metadata' => param.metadata.to_h
|
20
|
+
}
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
# @param params_batch [Array<Hash>] Sidekiq params that are now an array
|
@@ -16,7 +16,7 @@ Zeitwerk::Loader
|
|
16
16
|
|
17
17
|
Karafka::Params::Builders::Params.extend(Karafka::Extensions::ParamsBuilder)
|
18
18
|
Karafka::Params::Builders::ParamsBatch.extend(Karafka::Extensions::ParamsBatchBuilder)
|
19
|
-
Karafka::Params::Builders::
|
19
|
+
Karafka::Params::Builders::BatchMetadata.extend(Karafka::Extensions::BatchMetadataBuilder)
|
20
20
|
Karafka::Routing::Topic.include(Karafka::Extensions::SidekiqTopicAttributes)
|
21
21
|
Karafka::AttributesMap.prepend(Karafka::Extensions::SidekiqAttributesMap)
|
22
22
|
Karafka::Instrumentation::StdoutListener.include(Karafka::Extensions::StdoutListener)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka-sidekiq-backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -11,30 +11,30 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
14
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjEwODExMTQxNTEzWhcNMjIwODExMTQx
|
15
|
+
NTEzWjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
16
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDV2jKH4Ti87GM6nyT6D+ESzTI0MZDj
|
17
|
+
ak2/TEwnxvijMJyCCPKT/qIkbW4/f0VHM4rhPr1nW73sb5SZBVFCLlJcOSKOBdUY
|
18
|
+
TMY+SIXN2EtUaZuhAOe8LxtxjHTgRHvHcqUQMBENXTISNzCo32LnUxweu66ia4Pd
|
19
|
+
1mNRhzOqNv9YiBZvtBf7IMQ+sYdOCjboq2dlsWmJiwiDpY9lQBTnWORnT3mQxU5x
|
20
|
+
vPSwnLB854cHdCS8fQo4DjeJBRZHhEbcE5sqhEMB3RZA3EtFVEXOxlNxVTS3tncI
|
21
|
+
qyNXiWDaxcipaens4ObSY1C2HTV7OWb7OMqSCIybeYTSfkaSdqmcl4S6zxXkjH1J
|
22
|
+
tnjayAVzD+QVXGijsPLE2PFnJAh9iDET2cMsjabO1f6l1OQNyAtqpcyQcgfnyW0z
|
23
|
+
g7tGxTYD+6wJHffM9d9txOUw6djkF6bDxyqB8lo4Z3IObCx18AZjI9XPS9QG7w6q
|
24
|
+
LCWuMG2lkCcRgASqaVk9fEf9yMc2xxz5o3kCAwEAAaN3MHUwCQYDVR0TBAIwADAL
|
25
|
+
BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFBqUFCKCOe5IuueUVqOB991jyCLLMB0GA1Ud
|
26
26
|
EQQWMBSBEm1hY2llakBtZW5zZmVsZC5wbDAdBgNVHRIEFjAUgRJtYWNpZWpAbWVu
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
27
|
+
c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBADD0/UuTTFgW+CGk2U0RDw2RBOca
|
28
|
+
W2LTF/G7AOzuzD0Tc4voc7WXyrgKwJREv8rgBimLnNlgmFJLmtUCh2U/MgxvcilH
|
29
|
+
yshYcbseNvjkrtYnLRlWZR4SSB6Zei5AlyGVQLPkvdsBpNegcG6w075YEwzX/38a
|
30
|
+
8V9B/Yri2OGELBz8ykl7BsXUgNoUPA/4pHF6YRLz+VirOaUIQ4JfY7xGj6fSOWWz
|
31
|
+
/rQ/d77r6o1mfJYM/3BRVg73a3b7DmRnE5qjwmSaSQ7u802pJnLesmArch0xGCT/
|
32
|
+
fMmRli1Qb+6qOTl9mzD6UDMAyFR4t6MStLm0mIEqM0nBO5nUdUWbC7l9qXEf8XBE
|
33
|
+
2DP28p3EqSuS+lKbAWKcqv7t0iRhhmaod+Yn9mcrLN1sa3q3KSQ9BCyxezCD4Mk2
|
34
|
+
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
35
|
+
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
37
|
+
date: 2021-12-05 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: karafka
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.4.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.4.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: sidekiq
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,13 +66,13 @@ dependencies:
|
|
66
66
|
version: '4.2'
|
67
67
|
description: Karafka Sidekiq backend for background messages processing
|
68
68
|
email:
|
69
|
-
- maciej@
|
69
|
+
- maciej@mensfeld.pl
|
70
70
|
executables: []
|
71
71
|
extensions: []
|
72
72
|
extra_rdoc_files: []
|
73
73
|
files:
|
74
74
|
- ".coditsu/ci.yml"
|
75
|
-
- ".
|
75
|
+
- ".diffend.yml"
|
76
76
|
- ".github/workflows/ci.yml"
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
@@ -81,7 +81,7 @@ files:
|
|
81
81
|
- CHANGELOG.md
|
82
82
|
- Gemfile
|
83
83
|
- Gemfile.lock
|
84
|
-
- LICENSE
|
84
|
+
- MIT-LICENSE
|
85
85
|
- README.md
|
86
86
|
- Rakefile
|
87
87
|
- certs/mensfeld.pem
|
@@ -91,7 +91,7 @@ files:
|
|
91
91
|
- lib/karafka/base_worker.rb
|
92
92
|
- lib/karafka/cli/worker.rb
|
93
93
|
- lib/karafka/errors.rb
|
94
|
-
- lib/karafka/extensions/
|
94
|
+
- lib/karafka/extensions/batch_metadata_builder.rb
|
95
95
|
- lib/karafka/extensions/params_batch_builder.rb
|
96
96
|
- lib/karafka/extensions/params_builder.rb
|
97
97
|
- lib/karafka/extensions/sidekiq_attributes_map.rb
|
@@ -100,10 +100,11 @@ files:
|
|
100
100
|
- lib/karafka/interchanger.rb
|
101
101
|
- lib/karafka/workers/builder.rb
|
102
102
|
- lib/karafka_sidekiq_backend.rb
|
103
|
-
homepage: https://
|
103
|
+
homepage: https://karafka.io
|
104
104
|
licenses:
|
105
|
-
-
|
106
|
-
metadata:
|
105
|
+
- MIT
|
106
|
+
metadata:
|
107
|
+
source_code_uri: https://github.com/karafka/sidekiq-backend
|
107
108
|
post_install_message:
|
108
109
|
rdoc_options: []
|
109
110
|
require_paths:
|
@@ -112,14 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
113
|
requirements:
|
113
114
|
- - ">="
|
114
115
|
- !ruby/object:Gem::Version
|
115
|
-
version: 2.
|
116
|
+
version: 2.6.0
|
116
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
118
|
requirements:
|
118
119
|
- - ">="
|
119
120
|
- !ruby/object:Gem::Version
|
120
121
|
version: '0'
|
121
122
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.2.32
|
123
124
|
signing_key:
|
124
125
|
specification_version: 4
|
125
126
|
summary: Karafka Sidekiq backend for background messages processing
|
metadata.gz.sig
CHANGED
Binary file
|
data/.github/FUNDING.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
open_collective: karafka
|
data/LICENSE
DELETED
@@ -1,165 +0,0 @@
|
|
1
|
-
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
-
Version 3, 29 June 2007
|
3
|
-
|
4
|
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
-
Everyone is permitted to copy and distribute verbatim copies
|
6
|
-
of this license document, but changing it is not allowed.
|
7
|
-
|
8
|
-
|
9
|
-
This version of the GNU Lesser General Public License incorporates
|
10
|
-
the terms and conditions of version 3 of the GNU General Public
|
11
|
-
License, supplemented by the additional permissions listed below.
|
12
|
-
|
13
|
-
0. Additional Definitions.
|
14
|
-
|
15
|
-
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
-
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
-
General Public License.
|
18
|
-
|
19
|
-
"The Library" refers to a covered work governed by this License,
|
20
|
-
other than an Application or a Combined Work as defined below.
|
21
|
-
|
22
|
-
An "Application" is any work that makes use of an interface provided
|
23
|
-
by the Library, but which is not otherwise based on the Library.
|
24
|
-
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
-
of using an interface provided by the Library.
|
26
|
-
|
27
|
-
A "Combined Work" is a work produced by combining or linking an
|
28
|
-
Application with the Library. The particular version of the Library
|
29
|
-
with which the Combined Work was made is also called the "Linked
|
30
|
-
Version".
|
31
|
-
|
32
|
-
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
-
Corresponding Source for the Combined Work, excluding any source code
|
34
|
-
for portions of the Combined Work that, considered in isolation, are
|
35
|
-
based on the Application, and not on the Linked Version.
|
36
|
-
|
37
|
-
The "Corresponding Application Code" for a Combined Work means the
|
38
|
-
object code and/or source code for the Application, including any data
|
39
|
-
and utility programs needed for reproducing the Combined Work from the
|
40
|
-
Application, but excluding the System Libraries of the Combined Work.
|
41
|
-
|
42
|
-
1. Exception to Section 3 of the GNU GPL.
|
43
|
-
|
44
|
-
You may convey a covered work under sections 3 and 4 of this License
|
45
|
-
without being bound by section 3 of the GNU GPL.
|
46
|
-
|
47
|
-
2. Conveying Modified Versions.
|
48
|
-
|
49
|
-
If you modify a copy of the Library, and, in your modifications, a
|
50
|
-
facility refers to a function or data to be supplied by an Application
|
51
|
-
that uses the facility (other than as an argument passed when the
|
52
|
-
facility is invoked), then you may convey a copy of the modified
|
53
|
-
version:
|
54
|
-
|
55
|
-
a) under this License, provided that you make a good faith effort to
|
56
|
-
ensure that, in the event an Application does not supply the
|
57
|
-
function or data, the facility still operates, and performs
|
58
|
-
whatever part of its purpose remains meaningful, or
|
59
|
-
|
60
|
-
b) under the GNU GPL, with none of the additional permissions of
|
61
|
-
this License applicable to that copy.
|
62
|
-
|
63
|
-
3. Object Code Incorporating Material from Library Header Files.
|
64
|
-
|
65
|
-
The object code form of an Application may incorporate material from
|
66
|
-
a header file that is part of the Library. You may convey such object
|
67
|
-
code under terms of your choice, provided that, if the incorporated
|
68
|
-
material is not limited to numerical parameters, data structure
|
69
|
-
layouts and accessors, or small macros, inline functions and templates
|
70
|
-
(ten or fewer lines in length), you do both of the following:
|
71
|
-
|
72
|
-
a) Give prominent notice with each copy of the object code that the
|
73
|
-
Library is used in it and that the Library and its use are
|
74
|
-
covered by this License.
|
75
|
-
|
76
|
-
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
-
document.
|
78
|
-
|
79
|
-
4. Combined Works.
|
80
|
-
|
81
|
-
You may convey a Combined Work under terms of your choice that,
|
82
|
-
taken together, effectively do not restrict modification of the
|
83
|
-
portions of the Library contained in the Combined Work and reverse
|
84
|
-
engineering for debugging such modifications, if you also do each of
|
85
|
-
the following:
|
86
|
-
|
87
|
-
a) Give prominent notice with each copy of the Combined Work that
|
88
|
-
the Library is used in it and that the Library and its use are
|
89
|
-
covered by this License.
|
90
|
-
|
91
|
-
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
-
document.
|
93
|
-
|
94
|
-
c) For a Combined Work that displays copyright notices during
|
95
|
-
execution, include the copyright notice for the Library among
|
96
|
-
these notices, as well as a reference directing the user to the
|
97
|
-
copies of the GNU GPL and this license document.
|
98
|
-
|
99
|
-
d) Do one of the following:
|
100
|
-
|
101
|
-
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
-
License, and the Corresponding Application Code in a form
|
103
|
-
suitable for, and under terms that permit, the user to
|
104
|
-
recombine or relink the Application with a modified version of
|
105
|
-
the Linked Version to produce a modified Combined Work, in the
|
106
|
-
manner specified by section 6 of the GNU GPL for conveying
|
107
|
-
Corresponding Source.
|
108
|
-
|
109
|
-
1) Use a suitable shared library mechanism for linking with the
|
110
|
-
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
-
a copy of the Library already present on the user's computer
|
112
|
-
system, and (b) will operate properly with a modified version
|
113
|
-
of the Library that is interface-compatible with the Linked
|
114
|
-
Version.
|
115
|
-
|
116
|
-
e) Provide Installation Information, but only if you would otherwise
|
117
|
-
be required to provide such information under section 6 of the
|
118
|
-
GNU GPL, and only to the extent that such information is
|
119
|
-
necessary to install and execute a modified version of the
|
120
|
-
Combined Work produced by recombining or relinking the
|
121
|
-
Application with a modified version of the Linked Version. (If
|
122
|
-
you use option 4d0, the Installation Information must accompany
|
123
|
-
the Minimal Corresponding Source and Corresponding Application
|
124
|
-
Code. If you use option 4d1, you must provide the Installation
|
125
|
-
Information in the manner specified by section 6 of the GNU GPL
|
126
|
-
for conveying Corresponding Source.)
|
127
|
-
|
128
|
-
5. Combined Libraries.
|
129
|
-
|
130
|
-
You may place library facilities that are a work based on the
|
131
|
-
Library side by side in a single library together with other library
|
132
|
-
facilities that are not Applications and are not covered by this
|
133
|
-
License, and convey such a combined library under terms of your
|
134
|
-
choice, if you do both of the following:
|
135
|
-
|
136
|
-
a) Accompany the combined library with a copy of the same work based
|
137
|
-
on the Library, uncombined with any other library facilities,
|
138
|
-
conveyed under the terms of this License.
|
139
|
-
|
140
|
-
b) Give prominent notice with the combined library that part of it
|
141
|
-
is a work based on the Library, and explaining where to find the
|
142
|
-
accompanying uncombined form of the same work.
|
143
|
-
|
144
|
-
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
-
|
146
|
-
The Free Software Foundation may publish revised and/or new versions
|
147
|
-
of the GNU Lesser General Public License from time to time. Such new
|
148
|
-
versions will be similar in spirit to the present version, but may
|
149
|
-
differ in detail to address new problems or concerns.
|
150
|
-
|
151
|
-
Each version is given a distinguishing version number. If the
|
152
|
-
Library as you received it specifies that a certain numbered version
|
153
|
-
of the GNU Lesser General Public License "or any later version"
|
154
|
-
applies to it, you have the option of following the terms and
|
155
|
-
conditions either of that published version or of any later version
|
156
|
-
published by the Free Software Foundation. If the Library as you
|
157
|
-
received it does not specify a version number of the GNU Lesser
|
158
|
-
General Public License, you may choose any version of the GNU Lesser
|
159
|
-
General Public License ever published by the Free Software Foundation.
|
160
|
-
|
161
|
-
If the Library as you received it specifies that a proxy can decide
|
162
|
-
whether future versions of the GNU Lesser General Public License shall
|
163
|
-
apply, that proxy's public statement of acceptance of any version is
|
164
|
-
permanent authorization for you to choose that version for the
|
165
|
-
Library.
|