sidekiq-pool 1.7.3 → 1.9.0
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/Rakefile +4 -0
- data/lib/sidekiq/pool/cli.rb +6 -1
- data/lib/sidekiq/pool/version.rb +1 -1
- data/sidekiq-pool.gemspec +6 -6
- metadata +16 -19
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5a570cfb2092036b76f35e89ea276f9eb39b7b68645213257a739ae0e7b1d25d
|
4
|
+
data.tar.gz: 10c418961feaa04d49c0e8c23faefe55c56a4d06a2ea1cf9b57e48958c0ec46d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f88af075fa30a0ef809ec9874cd04ee8794015152e118146bda044ea303828426a67c577e3b7cb141849676fe81dec2b6a41e04737e79a39d34ff39f68bec50
|
7
|
+
data.tar.gz: e2384bb4207be796b44d45f3f83dbed467cdbbb2bb90b33abdb14cf870545d7e096a2fad8e615f8dd9b068bf18eae030ae300b291be16ea27f8856089dd07469
|
@@ -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/Rakefile
CHANGED
data/lib/sidekiq/pool/cli.rb
CHANGED
@@ -20,8 +20,13 @@ module Sidekiq
|
|
20
20
|
|
21
21
|
alias_method :run_child, :run
|
22
22
|
|
23
|
+
def write_pid
|
24
|
+
super if @master_pid == ::Process.pid
|
25
|
+
end
|
26
|
+
|
23
27
|
def run
|
24
28
|
@master_pid = $$
|
29
|
+
write_pid
|
25
30
|
|
26
31
|
trap_signals
|
27
32
|
update_process_name
|
@@ -178,7 +183,7 @@ module Sidekiq
|
|
178
183
|
def trap_signals
|
179
184
|
@self_read, @self_write = IO.pipe
|
180
185
|
|
181
|
-
%w(INT TERM USR1 USR2 CHLD HUP).each do |sig|
|
186
|
+
%w(INT TERM USR1 TSTP USR2 CHLD HUP).each do |sig|
|
182
187
|
begin
|
183
188
|
trap sig do
|
184
189
|
@self_write.puts(sig) unless fork?
|
data/lib/sidekiq/pool/version.rb
CHANGED
data/sidekiq-pool.gemspec
CHANGED
@@ -6,8 +6,8 @@ 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.}
|
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
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 'pronto-rubocop', '~> 0.
|
25
|
-
spec.add_development_dependency 'rake', '~>
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
|
+
spec.add_development_dependency 'pronto-rubocop', '~> 0.10'
|
25
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
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.9.0
|
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-08-17 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,49 +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
|
36
35
|
requirement: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
|
-
- - "
|
37
|
+
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
39
|
+
version: '0'
|
41
40
|
type: :development
|
42
41
|
prerelease: false
|
43
42
|
version_requirements: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
|
-
- - "
|
44
|
+
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
46
|
+
version: '0'
|
48
47
|
- !ruby/object:Gem::Dependency
|
49
48
|
name: pronto-rubocop
|
50
49
|
requirement: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
53
|
+
version: '0.10'
|
55
54
|
type: :development
|
56
55
|
prerelease: false
|
57
56
|
version_requirements: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
60
|
+
version: '0.10'
|
62
61
|
- !ruby/object:Gem::Dependency
|
63
62
|
name: rake
|
64
63
|
requirement: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
67
|
+
version: '13.0'
|
69
68
|
type: :development
|
70
69
|
prerelease: false
|
71
70
|
version_requirements: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
74
|
+
version: '13.0'
|
76
75
|
- !ruby/object:Gem::Dependency
|
77
76
|
name: rspec
|
78
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,17 +88,16 @@ dependencies:
|
|
89
88
|
version: '3.0'
|
90
89
|
description: Allows Sidekiq using more CPU cores on Ruby MRI by forking multiple processes.
|
91
90
|
email:
|
92
|
-
-
|
93
|
-
- raimondas.valickas@gmail.com
|
91
|
+
- backend@vinted.com
|
94
92
|
executables:
|
95
93
|
- sidekiq-pool
|
96
94
|
extensions: []
|
97
95
|
extra_rdoc_files: []
|
98
96
|
files:
|
97
|
+
- ".github/workflows/build_release_pipeline.yaml"
|
99
98
|
- ".gitignore"
|
100
99
|
- ".rspec"
|
101
100
|
- ".rubocop.yml"
|
102
|
-
- ".travis.yml"
|
103
101
|
- Gemfile
|
104
102
|
- LICENSE.txt
|
105
103
|
- README.md
|
@@ -129,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
127
|
- !ruby/object:Gem::Version
|
130
128
|
version: '0'
|
131
129
|
requirements: []
|
132
|
-
|
133
|
-
rubygems_version: 2.6.11
|
130
|
+
rubygems_version: 3.1.4
|
134
131
|
signing_key:
|
135
132
|
specification_version: 4
|
136
133
|
summary: Forks and manages multiple Sidekiq processes
|
data/.travis.yml
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- ruby-head
|
4
|
-
- 2.5.1
|
5
|
-
- 2.4.1
|
6
|
-
- 2.3.4
|
7
|
-
- 2.2.7
|
8
|
-
before_install: gem install bundler -v 1.11.2
|
9
|
-
after_success:
|
10
|
-
- >
|
11
|
-
[ "${TRAVIS_PULL_REQUEST}" != "false" ] &&
|
12
|
-
[ "${TRAVIS_RUBY_VERSION}" = "2.5.1" ] &&
|
13
|
-
PRONTO_PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} \
|
14
|
-
bundle exec pronto run -f github_status github_pr -c origin/${TRAVIS_BRANCH}
|