makandra_sidekiq 0.2.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +23 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +30 -2
- data/Gemfile.lock +9 -9
- data/README.md +1 -1
- data/lib/makandra_sidekiq/sidekiq_control.rb +15 -3
- data/lib/makandra_sidekiq/version.rb +1 -1
- data/makandra_sidekiq.gemspec +1 -0
- metadata +5 -4
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 174526de88bc2d464dfd1de7580b3c893b518bc72a1865f292fd9cfb64fccc85
|
4
|
+
data.tar.gz: ab50c8e6a19cef667c1773beccd9ae3c15f9c37334ecaaf7db5f949bdcae7dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 857c578c94e405fe18f03d7a90dcb20b91006d74b44d5134bfd67a68de927144aba7f7470482526ec9b23be18d10e8f0f06ce39fbba0195531ccc092d5bec834
|
7
|
+
data.tar.gz: a4e9e532e213d36b20829cdf044b4ea1d1a354f0977ce8a36b7be45a318c0b854b2b1c309d4af8181bb9ff6882ff022f7541d0de58bb8768052f545ed5de311d
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: build
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
branches:
|
8
|
+
- master
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-20.04
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Install ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.7
|
20
|
+
- name: Install dependencies
|
21
|
+
run: bundle install --quiet
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rspec spec
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.6
|
data/CHANGELOG.md
CHANGED
@@ -6,25 +6,53 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
|
10
|
+
## 0.2.3 2022-03-16
|
11
|
+
|
12
|
+
### Compatible changes
|
13
|
+
- Activate Rubygems MFA
|
14
|
+
|
15
|
+
|
16
|
+
## 0.2.2 2020-07-20
|
17
|
+
|
18
|
+
### Compatible changes
|
19
|
+
- Support edge case where Sidekiq stopped but left behind its pidfile (closes [#5](https://github.com/makandra/makandra_sidekiq/issues/5))
|
20
|
+
|
21
|
+
|
22
|
+
## 0.2.1 2020-05-18
|
23
|
+
|
24
|
+
### Compatible changes
|
25
|
+
- Fixed deprecation warnings on modern Bundlers. We are now using `Bundler.with_original_env`.
|
26
|
+
|
27
|
+
|
28
|
+
## 0.2.0 2019-11-08
|
29
|
+
|
9
30
|
### Compatible changes
|
10
|
-
- CHANGELOG to satisfy [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
31
|
+
- Added CHANGELOG to satisfy [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
32
|
+
- Fix: now considering the configured Sidekiq timeout when running
|
33
|
+
`sidekiqctl stop` through `sidekiq:stop`. Previously, long-running jobs would
|
34
|
+
get lost!
|
35
|
+
|
11
36
|
|
12
37
|
## 0.1.3 2017-02-13
|
13
38
|
|
14
39
|
### Changed
|
15
40
|
- Gem no longer depends on `capistrano`, since using its Capistrano recipes is optional.
|
16
41
|
|
42
|
+
|
17
43
|
## 0.1.2 2017-01-12
|
18
44
|
|
19
45
|
### Added
|
20
46
|
- `sidekiq:start` checks that sidekiq really comes up and will retry a few times.
|
21
47
|
|
48
|
+
|
22
49
|
## 0.1.1 2016-09-29
|
23
50
|
|
24
51
|
### Fixed
|
25
52
|
- Do not fail on first deploy.
|
26
53
|
|
27
|
-
|
54
|
+
|
55
|
+
## 0.1.0 2016-09-29
|
28
56
|
|
29
57
|
### Added
|
30
58
|
- Initial release.
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
makandra_sidekiq (0.
|
4
|
+
makandra_sidekiq (0.2.3)
|
5
5
|
sidekiq (< 6)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
connection_pool (2.2.
|
10
|
+
connection_pool (2.2.5)
|
11
11
|
diff-lcs (1.3)
|
12
|
-
rack (2.
|
13
|
-
rack-protection (2.0
|
12
|
+
rack (2.2.3)
|
13
|
+
rack-protection (2.1.0)
|
14
14
|
rack
|
15
15
|
rake (10.5.0)
|
16
|
-
redis (4.1.
|
16
|
+
redis (4.1.4)
|
17
17
|
rspec (3.5.0)
|
18
18
|
rspec-core (~> 3.5.0)
|
19
19
|
rspec-expectations (~> 3.5.0)
|
@@ -27,11 +27,11 @@ GEM
|
|
27
27
|
diff-lcs (>= 1.2.0, < 2.0)
|
28
28
|
rspec-support (~> 3.5.0)
|
29
29
|
rspec-support (3.5.0)
|
30
|
-
sidekiq (5.2.
|
30
|
+
sidekiq (5.2.9)
|
31
31
|
connection_pool (~> 2.2, >= 2.2.2)
|
32
|
-
rack (
|
32
|
+
rack (~> 2.0)
|
33
33
|
rack-protection (>= 1.5.0)
|
34
|
-
redis (>= 3.3.5, <
|
34
|
+
redis (>= 3.3.5, < 4.2)
|
35
35
|
|
36
36
|
PLATFORMS
|
37
37
|
ruby
|
@@ -43,4 +43,4 @@ DEPENDENCIES
|
|
43
43
|
rspec (~> 3.0)
|
44
44
|
|
45
45
|
BUNDLED WITH
|
46
|
-
1.17.
|
46
|
+
1.17.3
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# makandra_sidekiq [![Build Status](https://
|
1
|
+
# makandra_sidekiq [![Build Status](https://github.com/makandra/makandra_sidekiq/workflows/build/badge.svg)](https://github.com/makandra/makandra_sidekiq/actions)
|
2
2
|
|
3
3
|
Support code for our default Sidekiq setup.
|
4
4
|
|
@@ -70,9 +70,12 @@ module MakandraSidekiq
|
|
70
70
|
|
71
71
|
def running?
|
72
72
|
pid = read_pid
|
73
|
-
Process.kill(0, pid) if pid
|
73
|
+
Process.kill(0, pid) if pid # kill(0, pid) checks pid validity
|
74
74
|
rescue Errno::ESRCH
|
75
|
-
#
|
75
|
+
false # Not running
|
76
|
+
rescue Errno::EPERM
|
77
|
+
# The process from Sidekiq's pidfile does not belong to us. This can occur
|
78
|
+
# when Sidekiq for some reason stopped but left behind its pidfile.
|
76
79
|
false
|
77
80
|
end
|
78
81
|
|
@@ -166,12 +169,21 @@ module MakandraSidekiq
|
|
166
169
|
|
167
170
|
def bundle_exec(*command)
|
168
171
|
string_command = command.map(&:to_s)
|
169
|
-
|
172
|
+
root = @root.to_s
|
173
|
+
stdout_str, stderr_str, status = with_original_env { capture3('bundle', 'exec', *string_command, chdir: root) }
|
170
174
|
puts stdout_str
|
171
175
|
unless status.success?
|
172
176
|
fail "#{command} failed with message: #{stderr_str}"
|
173
177
|
end
|
174
178
|
end
|
175
179
|
|
180
|
+
def capture3(*command)
|
181
|
+
Open3.capture3(*command)
|
182
|
+
end
|
183
|
+
|
184
|
+
def with_original_env(&block)
|
185
|
+
Bundler.with_original_env(&block)
|
186
|
+
end
|
187
|
+
|
176
188
|
end
|
177
189
|
end
|
data/makandra_sidekiq.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Support code for sidekiq, including rake tasks and capistrano recipes.}
|
13
13
|
spec.homepage = "https://github.com/makandra/makandra_sidekiq"
|
14
|
+
spec.metadata = { 'rubygems_mfa_required' => 'true' }
|
14
15
|
|
15
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
17
|
spec.bindir = "exe"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makandra_sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -73,10 +73,10 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- ".github/workflows/test.yml"
|
76
77
|
- ".gitignore"
|
77
78
|
- ".rspec"
|
78
79
|
- ".ruby-version"
|
79
|
-
- ".travis.yml"
|
80
80
|
- CHANGELOG.md
|
81
81
|
- Gemfile
|
82
82
|
- Gemfile.lock
|
@@ -94,7 +94,8 @@ files:
|
|
94
94
|
- makandra_sidekiq.gemspec
|
95
95
|
homepage: https://github.com/makandra/makandra_sidekiq
|
96
96
|
licenses: []
|
97
|
-
metadata:
|
97
|
+
metadata:
|
98
|
+
rubygems_mfa_required: 'true'
|
98
99
|
post_install_message:
|
99
100
|
rdoc_options: []
|
100
101
|
require_paths:
|