sidekiq-sequence 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +46 -45
- data/README.md +3 -3
- data/lib/sidekiq/sequence/perform.rb +5 -1
- data/lib/sidekiq/sequence/version.rb +1 -1
- data/sidekiq-sequence.gemspec +3 -3
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d34107539f5eadbc416c637cdac60b3a488b0faa90d739f64929eedc624960a
|
4
|
+
data.tar.gz: 66eab723268ecc7562fc372249f769bc6a4f7b90e8fe5e7e6425638d332700b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ba60089644d1299b2ef764b7fa0fa4b504ddfc888b5996bbc2919bf438a64608b20c35b1fd41d67eff35f1f9b2808fe5c8998e0a989fff31dd18c7e94f6da61
|
7
|
+
data.tar.gz: 1c4f743f9ca4fe84265da6ca71bb939806d6b290b657d544f97c80c2e8d3980c57709d4a9f7d653e16d2357ea3e096576bd8cf258ef53df410c3e1ab45e7fe82
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,78 +1,79 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sidekiq-sequence (0.1.
|
5
|
-
activerecord (>=
|
6
|
-
railties (>=
|
4
|
+
sidekiq-sequence (0.1.10)
|
5
|
+
activerecord (>= 6)
|
6
|
+
railties (>= 6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (
|
12
|
-
actionview (=
|
13
|
-
activesupport (=
|
14
|
-
rack (~> 2.0, >= 2.0
|
11
|
+
actionpack (7.0.3)
|
12
|
+
actionview (= 7.0.3)
|
13
|
+
activesupport (= 7.0.3)
|
14
|
+
rack (~> 2.0, >= 2.2.0)
|
15
15
|
rack-test (>= 0.6.3)
|
16
16
|
rails-dom-testing (~> 2.0)
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
18
|
-
actionview (
|
19
|
-
activesupport (=
|
18
|
+
actionview (7.0.3)
|
19
|
+
activesupport (= 7.0.3)
|
20
20
|
builder (~> 3.1)
|
21
21
|
erubi (~> 1.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
24
|
-
activemodel (
|
25
|
-
activesupport (=
|
26
|
-
activerecord (
|
27
|
-
activemodel (=
|
28
|
-
activesupport (=
|
29
|
-
activesupport (
|
24
|
+
activemodel (7.0.3)
|
25
|
+
activesupport (= 7.0.3)
|
26
|
+
activerecord (7.0.3)
|
27
|
+
activemodel (= 7.0.3)
|
28
|
+
activesupport (= 7.0.3)
|
29
|
+
activesupport (7.0.3)
|
30
30
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
31
|
-
i18n (>=
|
32
|
-
minitest (
|
33
|
-
tzinfo (~>
|
34
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
31
|
+
i18n (>= 1.6, < 2)
|
32
|
+
minitest (>= 5.1)
|
33
|
+
tzinfo (~> 2.0)
|
35
34
|
autotest-suffix (1.1.0)
|
36
35
|
builder (3.2.4)
|
37
|
-
concurrent-ruby (1.1.
|
36
|
+
concurrent-ruby (1.1.10)
|
38
37
|
crass (1.0.6)
|
39
|
-
erubi (1.
|
40
|
-
i18n (1.
|
38
|
+
erubi (1.10.0)
|
39
|
+
i18n (1.10.0)
|
41
40
|
concurrent-ruby (~> 1.0)
|
42
|
-
loofah (2.
|
41
|
+
loofah (2.18.0)
|
43
42
|
crass (~> 1.0.2)
|
44
43
|
nokogiri (>= 1.5.9)
|
45
44
|
method_source (1.0.0)
|
46
|
-
mini_portile2 (2.
|
47
|
-
minitest (5.
|
45
|
+
mini_portile2 (2.8.0)
|
46
|
+
minitest (5.16.2)
|
48
47
|
minitest-autotest (1.1.1)
|
49
48
|
minitest-server (~> 1.0)
|
50
49
|
path_expander (~> 1.0)
|
51
50
|
minitest-server (1.0.6)
|
52
51
|
minitest (~> 5.0)
|
53
|
-
nokogiri (1.
|
54
|
-
mini_portile2 (~> 2.
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
52
|
+
nokogiri (1.13.6)
|
53
|
+
mini_portile2 (~> 2.8.0)
|
54
|
+
racc (~> 1.4)
|
55
|
+
path_expander (1.1.1)
|
56
|
+
racc (1.6.0)
|
57
|
+
rack (2.2.4)
|
58
|
+
rack-test (2.0.2)
|
59
|
+
rack (>= 1.3)
|
59
60
|
rails-dom-testing (2.0.3)
|
60
61
|
activesupport (>= 4.2.0)
|
61
62
|
nokogiri (>= 1.6)
|
62
|
-
rails-html-sanitizer (1.3
|
63
|
+
rails-html-sanitizer (1.4.3)
|
63
64
|
loofah (~> 2.3)
|
64
|
-
railties (
|
65
|
-
actionpack (=
|
66
|
-
activesupport (=
|
65
|
+
railties (7.0.3)
|
66
|
+
actionpack (= 7.0.3)
|
67
|
+
activesupport (= 7.0.3)
|
67
68
|
method_source
|
68
|
-
rake (>=
|
69
|
-
thor (
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
tzinfo (
|
74
|
-
|
75
|
-
zeitwerk (2.
|
69
|
+
rake (>= 12.2)
|
70
|
+
thor (~> 1.0)
|
71
|
+
zeitwerk (~> 2.5)
|
72
|
+
rake (13.0.6)
|
73
|
+
thor (1.2.1)
|
74
|
+
tzinfo (2.0.4)
|
75
|
+
concurrent-ruby (~> 1.0)
|
76
|
+
zeitwerk (2.6.0)
|
76
77
|
|
77
78
|
PLATFORMS
|
78
79
|
ruby
|
@@ -81,8 +82,8 @@ DEPENDENCIES
|
|
81
82
|
autotest-suffix
|
82
83
|
minitest
|
83
84
|
minitest-autotest
|
84
|
-
rake
|
85
|
+
rake
|
85
86
|
sidekiq-sequence!
|
86
87
|
|
87
88
|
BUNDLED WITH
|
88
|
-
2.
|
89
|
+
2.3.17
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ class ContactFormSequence::CreateMessage
|
|
50
50
|
end
|
51
51
|
```
|
52
52
|
|
53
|
-
Each Step is run in the order they are defined, and each is a Sidekiq worker. If a worker fails, subsequent steps will not be run, and the worker will be placed in the Sidekiq retry queue. Once it succeeds, the next
|
53
|
+
Each Step is run in the order they are defined, and each is a Sidekiq worker. If a worker fails, subsequent steps will not be run, and the worker will be placed in the Sidekiq retry queue. Once it succeeds, the next step will be run, and so on.
|
54
54
|
|
55
55
|
Start a Sequence by simply initializing the Sequence class you created:
|
56
56
|
|
@@ -61,7 +61,7 @@ ContactFormSequence.new name: 'Joel', github: 'joelmoss'
|
|
61
61
|
You can pass named arguments, and these will be persisted and available in the Sequence and its workers:
|
62
62
|
|
63
63
|
```ruby
|
64
|
-
class ContactFormSequence::
|
64
|
+
class ContactFormSequence::CreateMessage
|
65
65
|
include Sidekiq::Sequence::Worker
|
66
66
|
|
67
67
|
def perform
|
@@ -73,7 +73,7 @@ end
|
|
73
73
|
You can also modify Sequence `data` in any worker, which is great for passing data to subsequent steps:
|
74
74
|
|
75
75
|
```ruby
|
76
|
-
class ContactFormSequence::
|
76
|
+
class ContactFormSequence::AssignMessage
|
77
77
|
include Sidekiq::Sequence::Worker
|
78
78
|
|
79
79
|
def perform
|
@@ -15,7 +15,11 @@ module Sidekiq
|
|
15
15
|
@record.save!
|
16
16
|
|
17
17
|
# Perform the next in sequence.
|
18
|
-
|
18
|
+
if ::Rails.version.to_f >= 6.0
|
19
|
+
self.class.module_parent.perform_step @record.current_step, @record.id
|
20
|
+
else
|
21
|
+
self.class.parent.perform_step @record.current_step, @record.id
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
data/sidekiq-sequence.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Create and manage sequential jobs in Sidekiq'
|
13
13
|
spec.homepage = 'https://github.com/joelmoss/sidekiq-sequence'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = spec.homepage
|
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
|
|
25
25
|
end
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
|
28
|
-
spec.add_dependency '
|
29
|
-
spec.add_dependency '
|
28
|
+
spec.add_dependency 'activerecord', '>= 6'
|
29
|
+
spec.add_dependency 'railties', '>= 6'
|
30
30
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-sequence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6'
|
41
41
|
description: Create and manage sequential jobs in Sidekiq
|
42
42
|
email:
|
43
43
|
- joel@developwithstyle.com
|
@@ -71,7 +71,7 @@ metadata:
|
|
71
71
|
homepage_uri: https://github.com/joelmoss/sidekiq-sequence
|
72
72
|
source_code_uri: https://github.com/joelmoss/sidekiq-sequence
|
73
73
|
changelog_uri: https://github.com/joelmoss/sidekiq-sequence/releases
|
74
|
-
post_install_message:
|
74
|
+
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|
77
77
|
- lib
|
@@ -79,15 +79,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.
|
82
|
+
version: 2.7.0
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
85
|
- - ">="
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.
|
90
|
-
signing_key:
|
89
|
+
rubygems_version: 3.3.7
|
90
|
+
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Sequential Sidekiq jobs
|
93
93
|
test_files: []
|