sidekiq-pool 1.7.1 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/build_release_pipeline.yaml +54 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +15 -0
- data/README.md +3 -3
- data/Rakefile +4 -0
- data/lib/sidekiq/pool.rb +2 -3
- data/lib/sidekiq/pool/cli.rb +3 -3
- data/lib/sidekiq/pool/version.rb +1 -1
- data/sidekiq-pool.gemspec +7 -6
- metadata +28 -16
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ca3fa913c595d916c0df9e2897c6047fae80eef1f78e3a7e53779874c9e3ade9
|
4
|
+
data.tar.gz: 20d365396e1a193714f91a8c80dc625e29e1d309acd66ce9f6b53de38e603619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8138fb77f6ca5e6601955f513ad5a0d0ed2953f87f1e1179aa575fc7e8d6d43fb5b995497d34babf70e6c3be168cef5c59cc3c289abeb55a4cd0ae1676790c41
|
7
|
+
data.tar.gz: 054f960402c6888ede263ab667389fc3bbaf0d1352b3acf7f040b0d6bb57f18f251de2d4ac99207fc48bdad42a45ac204f12fb4dc906457014f4527723ffb91b
|
@@ -0,0 +1,54 @@
|
|
1
|
+
name: Build and release ruby gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches: [ master ]
|
6
|
+
push:
|
7
|
+
workflow_dispatch:
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build-release-pipeline:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
container: ruby:2.7.2
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Setup
|
16
|
+
run: |
|
17
|
+
apt-get update -y && apt-get install -y --no-install-recommends cmake=3.13.4-1
|
18
|
+
gem install bundler
|
19
|
+
bundle install
|
20
|
+
|
21
|
+
- name: Test
|
22
|
+
run: bundle exec rake
|
23
|
+
|
24
|
+
- name: Build
|
25
|
+
id: build
|
26
|
+
if: success() && github.ref == 'refs/heads/master'
|
27
|
+
run: |
|
28
|
+
bundle exec rake build
|
29
|
+
echo "::set-output name=gem_version::v$(bundle exec rake version)"
|
30
|
+
|
31
|
+
- name: Release
|
32
|
+
if: success() && github.ref == 'refs/heads/master'
|
33
|
+
run: |
|
34
|
+
mkdir -p $HOME/.gem
|
35
|
+
touch $HOME/.gem/credentials
|
36
|
+
chmod 600 $HOME/.gem/credentials
|
37
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
38
|
+
gem push pkg/*
|
39
|
+
env:
|
40
|
+
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
|
41
|
+
|
42
|
+
- name: Tag repo with new gem version
|
43
|
+
if: success() && github.ref == 'refs/heads/master'
|
44
|
+
uses: actions/github-script@v3
|
45
|
+
with:
|
46
|
+
github-token: ${{ github.token }}
|
47
|
+
script: |
|
48
|
+
github.git.createRef({
|
49
|
+
owner: context.repo.owner,
|
50
|
+
repo: context.repo.repo,
|
51
|
+
ref: "refs/tags/${{ steps.build.outputs.gem_version }}",
|
52
|
+
sha: context.sha
|
53
|
+
})
|
54
|
+
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Sidekiq::Pool
|
2
2
|
|
3
3
|
[![Gem](https://img.shields.io/gem/v/sidekiq-pool.svg)](https://rubygems.org/gems/sidekiq-pool)
|
4
|
-
[![Build Status](https://travis-ci.org/
|
4
|
+
[![Build Status](https://travis-ci.org/vinted/sidekiq-pool.svg?branch=master)](https://travis-ci.org/vinted/sidekiq-pool)
|
5
5
|
|
6
6
|
Allows Sidekiq using more CPU cores on Ruby MRI by forking multiple processes.
|
7
7
|
Also adds an option to use different command line option workers in the same pool.
|
@@ -41,7 +41,7 @@ Start pool with a non-default path config
|
|
41
41
|
|
42
42
|
## Signals
|
43
43
|
|
44
|
-
Signals `USR1`, `USR2` are forwarded to the children.
|
44
|
+
Signals `USR1`, `USR2`, and `TSTP` are forwarded to the children. Depending on the version of Sidekiq, you may need to send `USR1` or `TSTP` to prepare it for shutdown. For more information, please read [signals and sidekiq](https://github.com/mperham/sidekiq/wiki/Signals) documentation.
|
45
45
|
|
46
46
|
Signal `HUP` to parent starts new children and then stops old.
|
47
47
|
|
@@ -60,7 +60,7 @@ end
|
|
60
60
|
|
61
61
|
## Contributing
|
62
62
|
|
63
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
63
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vinted/sidekiq-pool.
|
64
64
|
|
65
65
|
## License
|
66
66
|
|
data/Rakefile
CHANGED
data/lib/sidekiq/pool.rb
CHANGED
data/lib/sidekiq/pool/cli.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'sidekiq/cli'
|
2
|
-
require 'sidekiq/pool
|
2
|
+
require 'sidekiq/pool'
|
3
3
|
|
4
4
|
module Sidekiq
|
5
5
|
module Pool
|
@@ -178,7 +178,7 @@ module Sidekiq
|
|
178
178
|
def trap_signals
|
179
179
|
@self_read, @self_write = IO.pipe
|
180
180
|
|
181
|
-
%w(INT TERM USR1 USR2 CHLD HUP).each do |sig|
|
181
|
+
%w(INT TERM USR1 TSTP USR2 CHLD HUP).each do |sig|
|
182
182
|
begin
|
183
183
|
trap sig do
|
184
184
|
@self_write.puts(sig) unless fork?
|
@@ -241,7 +241,7 @@ module Sidekiq
|
|
241
241
|
exit(0)
|
242
242
|
when 'CHLD'
|
243
243
|
check_pool
|
244
|
-
when 'USR1'
|
244
|
+
when 'USR1', 'TSTP'
|
245
245
|
@done = true
|
246
246
|
update_process_name
|
247
247
|
signal_to_pool(sig)
|
data/lib/sidekiq/pool/version.rb
CHANGED
data/sidekiq-pool.gemspec
CHANGED
@@ -6,21 +6,22 @@ require 'sidekiq/pool/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'sidekiq-pool'
|
8
8
|
spec.version = Sidekiq::Pool::VERSION
|
9
|
-
spec.authors = ['
|
10
|
-
spec.email = ['
|
9
|
+
spec.authors = ['Vinted']
|
10
|
+
spec.email = ['backend@vinted.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Forks and manages multiple Sidekiq processes}
|
13
13
|
spec.description = %q{Allows Sidekiq using more CPU cores on Ruby MRI by forking multiple processes.}
|
14
|
-
spec.homepage = 'https://github.com/
|
14
|
+
spec.homepage = 'https://github.com/vinted/sidekiq-pool'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.executables = ['sidekiq-pool']
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'sidekiq', '>= 3.0', '<
|
21
|
+
spec.add_dependency 'sidekiq', '>= 3.0', '< 7.0'
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler'
|
24
|
-
spec.add_development_dependency '
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
|
+
spec.add_development_dependency 'pronto-rubocop', '~> 0.10'
|
25
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
25
26
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
27
|
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Raimondas Valickas
|
7
|
+
- Vinted
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sidekiq
|
@@ -20,7 +19,7 @@ dependencies:
|
|
20
19
|
version: '3.0'
|
21
20
|
- - "<"
|
22
21
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
22
|
+
version: '7.0'
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,35 +29,49 @@ dependencies:
|
|
30
29
|
version: '3.0'
|
31
30
|
- - "<"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
32
|
+
version: '7.0'
|
34
33
|
- !ruby/object:Gem::Dependency
|
35
34
|
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: pronto-rubocop
|
36
49
|
requirement: !ruby/object:Gem::Requirement
|
37
50
|
requirements:
|
38
51
|
- - "~>"
|
39
52
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
53
|
+
version: '0.10'
|
41
54
|
type: :development
|
42
55
|
prerelease: false
|
43
56
|
version_requirements: !ruby/object:Gem::Requirement
|
44
57
|
requirements:
|
45
58
|
- - "~>"
|
46
59
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
60
|
+
version: '0.10'
|
48
61
|
- !ruby/object:Gem::Dependency
|
49
62
|
name: rake
|
50
63
|
requirement: !ruby/object:Gem::Requirement
|
51
64
|
requirements:
|
52
65
|
- - "~>"
|
53
66
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
67
|
+
version: '13.0'
|
55
68
|
type: :development
|
56
69
|
prerelease: false
|
57
70
|
version_requirements: !ruby/object:Gem::Requirement
|
58
71
|
requirements:
|
59
72
|
- - "~>"
|
60
73
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
74
|
+
version: '13.0'
|
62
75
|
- !ruby/object:Gem::Dependency
|
63
76
|
name: rspec
|
64
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,16 +88,16 @@ dependencies:
|
|
75
88
|
version: '3.0'
|
76
89
|
description: Allows Sidekiq using more CPU cores on Ruby MRI by forking multiple processes.
|
77
90
|
email:
|
78
|
-
-
|
79
|
-
- raimondas.valickas@gmail.com
|
91
|
+
- backend@vinted.com
|
80
92
|
executables:
|
81
93
|
- sidekiq-pool
|
82
94
|
extensions: []
|
83
95
|
extra_rdoc_files: []
|
84
96
|
files:
|
97
|
+
- ".github/workflows/build_release_pipeline.yaml"
|
85
98
|
- ".gitignore"
|
86
99
|
- ".rspec"
|
87
|
-
- ".
|
100
|
+
- ".rubocop.yml"
|
88
101
|
- Gemfile
|
89
102
|
- LICENSE.txt
|
90
103
|
- README.md
|
@@ -95,7 +108,7 @@ files:
|
|
95
108
|
- lib/sidekiq/pool/cli.rb
|
96
109
|
- lib/sidekiq/pool/version.rb
|
97
110
|
- sidekiq-pool.gemspec
|
98
|
-
homepage: https://github.com/
|
111
|
+
homepage: https://github.com/vinted/sidekiq-pool
|
99
112
|
licenses:
|
100
113
|
- MIT
|
101
114
|
metadata: {}
|
@@ -114,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
127
|
- !ruby/object:Gem::Version
|
115
128
|
version: '0'
|
116
129
|
requirements: []
|
117
|
-
|
118
|
-
rubygems_version: 2.6.11
|
130
|
+
rubygems_version: 3.1.4
|
119
131
|
signing_key:
|
120
132
|
specification_version: 4
|
121
133
|
summary: Forks and manages multiple Sidekiq processes
|