acidic_job 1.0.0.beta.10 → 1.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +12 -36
  3. data/.gitignore +0 -5
  4. data/.ruby_version +1 -0
  5. data/Gemfile +31 -0
  6. data/Gemfile.lock +130 -136
  7. data/README.md +58 -278
  8. data/acidic_job.gemspec +2 -15
  9. data/bin/console +2 -4
  10. data/lib/acidic_job/awaiting.rb +68 -0
  11. data/lib/acidic_job/errors.rb +19 -11
  12. data/lib/acidic_job/extensions/action_mailer.rb +11 -3
  13. data/lib/acidic_job/extensions/active_job.rb +39 -0
  14. data/lib/acidic_job/extensions/noticed.rb +11 -5
  15. data/lib/acidic_job/extensions/sidekiq.rb +101 -0
  16. data/lib/acidic_job/finished_point.rb +5 -3
  17. data/lib/acidic_job/idempotency_key.rb +15 -18
  18. data/lib/acidic_job/perform_wrapper.rb +36 -9
  19. data/lib/acidic_job/recovery_point.rb +3 -2
  20. data/lib/acidic_job/run.rb +42 -268
  21. data/lib/acidic_job/staging.rb +30 -0
  22. data/lib/acidic_job/step.rb +83 -0
  23. data/lib/acidic_job/version.rb +1 -1
  24. data/lib/acidic_job.rb +244 -20
  25. data/lib/generators/acidic_job_generator.rb +35 -0
  26. data/lib/generators/templates/create_acidic_job_runs_migration.rb.erb +19 -0
  27. metadata +15 -209
  28. data/.github/FUNDING.yml +0 -13
  29. data/.tool-versions +0 -1
  30. data/UPGRADE_GUIDE.md +0 -81
  31. data/combustion/log/test.log +0 -0
  32. data/gemfiles/rails_6.1_sidekiq_6.4.gemfile +0 -10
  33. data/gemfiles/rails_6.1_sidekiq_6.5.gemfile +0 -10
  34. data/gemfiles/rails_7.0_sidekiq_6.4.gemfile +0 -10
  35. data/gemfiles/rails_7.0_sidekiq_6.5.gemfile +0 -10
  36. data/gemfiles/rails_7.1_sidekiq_6.4.gemfile +0 -10
  37. data/gemfiles/rails_7.1_sidekiq_6.5.gemfile +0 -10
  38. data/lib/acidic_job/active_kiq.rb +0 -114
  39. data/lib/acidic_job/arguments.rb +0 -22
  40. data/lib/acidic_job/base.rb +0 -11
  41. data/lib/acidic_job/logger.rb +0 -31
  42. data/lib/acidic_job/mixin.rb +0 -250
  43. data/lib/acidic_job/processor.rb +0 -95
  44. data/lib/acidic_job/rails.rb +0 -40
  45. data/lib/acidic_job/serializer.rb +0 -24
  46. data/lib/acidic_job/serializers/exception_serializer.rb +0 -41
  47. data/lib/acidic_job/serializers/finished_point_serializer.rb +0 -24
  48. data/lib/acidic_job/serializers/job_serializer.rb +0 -27
  49. data/lib/acidic_job/serializers/range_serializer.rb +0 -28
  50. data/lib/acidic_job/serializers/recovery_point_serializer.rb +0 -25
  51. data/lib/acidic_job/serializers/worker_serializer.rb +0 -27
  52. data/lib/acidic_job/test_case.rb +0 -9
  53. data/lib/acidic_job/testing.rb +0 -73
  54. data/lib/acidic_job/workflow.rb +0 -70
  55. data/lib/acidic_job/workflow_builder.rb +0 -35
  56. data/lib/acidic_job/workflow_step.rb +0 -103
  57. data/lib/generators/acidic_job/drop_tables_generator.rb +0 -26
  58. data/lib/generators/acidic_job/install_generator.rb +0 -27
  59. data/lib/generators/acidic_job/templates/create_acidic_job_runs_migration.rb.erb +0 -19
  60. data/lib/generators/acidic_job/templates/drop_acidic_job_keys_migration.rb.erb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c2f5b13489acc0e87c1de14248857c107d794a60d0af9a3cafdc5606c80929c
4
- data.tar.gz: 6bc97dda18375d3efd1cd37c7c6c2642b2cbe6c44a73e3451e07ebcce738ab30
3
+ metadata.gz: 75590561a8f799a4c2b78fa7b1fae585932053584c0dd2a596b174c2209d7da5
4
+ data.tar.gz: ef0020c5b1e5fdd4675f2375c29d917af3da048f8933abc1dcdf0878f432959c
5
5
  SHA512:
6
- metadata.gz: 586158e2ccfa061f7efa636dd14ef9d83be1105d32e964e29a77df6728e941d8506379794e7144b8ec41f8c4e7187fae6de66cf7c37c16fd07d45a6e84bdb849
7
- data.tar.gz: fdf9c926a74abc99262c76a508f07dd87de823958b5ea3230a5c6f98c17cb2f93153a32f8d34cb4c27145f0a5838a5e2090a32f815b7e8c61a50f7aafa65b39e
6
+ metadata.gz: b3fc8af679dfe233a3d454322500d35cde3bfe19f129ec45ed7cde50948e049a441b1247a473e48f93e7044b745a2f96c2276931f04ce428172415d5b0589732
7
+ data.tar.gz: 965c47fe87e6f10d3ea67058afb20c885d13e73dee4896485ff2c39e369b32066b4944ee84864e5d9a79dd050b8677b59d5f5dc54fd3fad6698d20672ab83503
@@ -1,42 +1,18 @@
1
- name: CI
1
+ name: Ruby
2
2
 
3
- on: [push]
3
+ on: [push,pull_request]
4
4
 
5
5
  jobs:
6
6
  build:
7
7
  runs-on: ubuntu-latest
8
-
9
- strategy:
10
- fail-fast: false
11
- matrix:
12
- ruby: ["2.7", "3.0", "3.1"]
13
- rails: ["6.1", "7.0"]
14
- sidekiq: ["6.4", "6.5"]
15
- services:
16
- redis:
17
- image: redis
18
- options: >-
19
- --health-cmd "redis-cli ping"
20
- --health-interval 10s
21
- --health-timeout 5s
22
- --health-retries 5
23
- ports:
24
- - 6379:6379
25
-
26
- env:
27
- BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_sidekiq_${{ matrix.sidekiq }}.gemfile
28
-
29
8
  steps:
30
- - uses: actions/checkout@v2
31
-
32
- - name: Set up Ruby
33
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
34
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
35
- uses: ruby/setup-ruby@v1
36
- with:
37
- bundler-cache: true # 'bundle install' and cache gems
38
- ruby-version: ${{ matrix.ruby }}
39
-
40
- - name: Run the default task
41
- run: bundle exec rake
42
- timeout-minutes: 2
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.1
14
+ - name: Run the default task
15
+ run: |
16
+ gem install bundler -v 2.2.31
17
+ bundle install
18
+ bundle exec rake
data/.gitignore CHANGED
@@ -10,8 +10,3 @@
10
10
  /test/database.sqlite
11
11
  slides.md
12
12
  /test/dummy
13
- /test/log
14
- /database.sqlite
15
- /test/combustion/database.sqlite
16
- /test/combustion/log/test.log
17
- /gemfiles/*.lock
data/.ruby_version ADDED
@@ -0,0 +1 @@
1
+ 2.7.1
data/Gemfile CHANGED
@@ -2,4 +2,35 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ # Specify your gem's dependencies in acidic_job.gemspec
5
6
  gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.7"
13
+
14
+ gem "rubocop-minitest"
15
+
16
+ gem "rubocop-rake"
17
+
18
+ gem "activerecord", "~> 6.1.3.2"
19
+
20
+ gem "activejob", "~> 6.1.3.2"
21
+
22
+ gem "sqlite3"
23
+
24
+ gem "database_cleaner"
25
+
26
+ gem "simplecov"
27
+
28
+ gem "pry"
29
+
30
+ gem "sidekiq"
31
+
32
+ gem "noticed"
33
+
34
+ gem "combustion"
35
+
36
+ gem "warning"
data/Gemfile.lock CHANGED
@@ -1,91 +1,90 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acidic_job (1.0.0.beta.10)
5
- activejob
6
- activerecord
4
+ acidic_job (1.0.0.pre1)
5
+ activerecord (>= 6.1.0)
7
6
  activesupport
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
- actioncable (7.0.3.1)
13
- actionpack (= 7.0.3.1)
14
- activesupport (= 7.0.3.1)
11
+ actioncable (6.1.3.2)
12
+ actionpack (= 6.1.3.2)
13
+ activesupport (= 6.1.3.2)
15
14
  nio4r (~> 2.0)
16
15
  websocket-driver (>= 0.6.1)
17
- actionmailbox (7.0.3.1)
18
- actionpack (= 7.0.3.1)
19
- activejob (= 7.0.3.1)
20
- activerecord (= 7.0.3.1)
21
- activestorage (= 7.0.3.1)
22
- activesupport (= 7.0.3.1)
16
+ actionmailbox (6.1.3.2)
17
+ actionpack (= 6.1.3.2)
18
+ activejob (= 6.1.3.2)
19
+ activerecord (= 6.1.3.2)
20
+ activestorage (= 6.1.3.2)
21
+ activesupport (= 6.1.3.2)
23
22
  mail (>= 2.7.1)
24
- net-imap
25
- net-pop
26
- net-smtp
27
- actionmailer (7.0.3.1)
28
- actionpack (= 7.0.3.1)
29
- actionview (= 7.0.3.1)
30
- activejob (= 7.0.3.1)
31
- activesupport (= 7.0.3.1)
23
+ actionmailer (6.1.3.2)
24
+ actionpack (= 6.1.3.2)
25
+ actionview (= 6.1.3.2)
26
+ activejob (= 6.1.3.2)
27
+ activesupport (= 6.1.3.2)
32
28
  mail (~> 2.5, >= 2.5.4)
33
- net-imap
34
- net-pop
35
- net-smtp
36
29
  rails-dom-testing (~> 2.0)
37
- actionpack (7.0.3.1)
38
- actionview (= 7.0.3.1)
39
- activesupport (= 7.0.3.1)
40
- rack (~> 2.0, >= 2.2.0)
30
+ actionpack (6.1.3.2)
31
+ actionview (= 6.1.3.2)
32
+ activesupport (= 6.1.3.2)
33
+ rack (~> 2.0, >= 2.0.9)
41
34
  rack-test (>= 0.6.3)
42
35
  rails-dom-testing (~> 2.0)
43
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
44
- actiontext (7.0.3.1)
45
- actionpack (= 7.0.3.1)
46
- activerecord (= 7.0.3.1)
47
- activestorage (= 7.0.3.1)
48
- activesupport (= 7.0.3.1)
49
- globalid (>= 0.6.0)
37
+ actiontext (6.1.3.2)
38
+ actionpack (= 6.1.3.2)
39
+ activerecord (= 6.1.3.2)
40
+ activestorage (= 6.1.3.2)
41
+ activesupport (= 6.1.3.2)
50
42
  nokogiri (>= 1.8.5)
51
- actionview (7.0.3.1)
52
- activesupport (= 7.0.3.1)
43
+ actionview (6.1.3.2)
44
+ activesupport (= 6.1.3.2)
53
45
  builder (~> 3.1)
54
46
  erubi (~> 1.4)
55
47
  rails-dom-testing (~> 2.0)
56
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
57
- activejob (7.0.3.1)
58
- activesupport (= 7.0.3.1)
49
+ activejob (6.1.3.2)
50
+ activesupport (= 6.1.3.2)
59
51
  globalid (>= 0.3.6)
60
- activemodel (7.0.3.1)
61
- activesupport (= 7.0.3.1)
62
- activerecord (7.0.3.1)
63
- activemodel (= 7.0.3.1)
64
- activesupport (= 7.0.3.1)
65
- activestorage (7.0.3.1)
66
- actionpack (= 7.0.3.1)
67
- activejob (= 7.0.3.1)
68
- activerecord (= 7.0.3.1)
69
- activesupport (= 7.0.3.1)
70
- marcel (~> 1.0)
71
- mini_mime (>= 1.1.0)
72
- activesupport (7.0.3.1)
52
+ activemodel (6.1.3.2)
53
+ activesupport (= 6.1.3.2)
54
+ activerecord (6.1.3.2)
55
+ activemodel (= 6.1.3.2)
56
+ activesupport (= 6.1.3.2)
57
+ activestorage (6.1.3.2)
58
+ actionpack (= 6.1.3.2)
59
+ activejob (= 6.1.3.2)
60
+ activerecord (= 6.1.3.2)
61
+ activesupport (= 6.1.3.2)
62
+ marcel (~> 1.0.0)
63
+ mini_mime (~> 1.0.2)
64
+ activesupport (6.1.3.2)
73
65
  concurrent-ruby (~> 1.0, >= 1.0.2)
74
66
  i18n (>= 1.6, < 2)
75
67
  minitest (>= 5.1)
76
68
  tzinfo (~> 2.0)
69
+ zeitwerk (~> 2.3)
77
70
  addressable (2.8.0)
78
71
  public_suffix (>= 2.0.2, < 5.0)
79
72
  ast (2.4.2)
80
73
  builder (3.2.4)
81
- combustion (1.3.7)
74
+ coderay (1.1.3)
75
+ combustion (1.3.5)
82
76
  activesupport (>= 3.0.0)
83
77
  railties (>= 3.0.0)
84
78
  thor (>= 0.14.6)
85
- concurrent-ruby (1.1.10)
79
+ concurrent-ruby (1.1.9)
86
80
  connection_pool (2.2.5)
87
81
  crass (1.0.6)
88
- digest (3.1.0)
82
+ database_cleaner (2.0.1)
83
+ database_cleaner-active_record (~> 2.0.0)
84
+ database_cleaner-active_record (2.0.1)
85
+ activerecord (>= 5.a)
86
+ database_cleaner-core (~> 2.0.0)
87
+ database_cleaner-core (2.0.1)
89
88
  docile (1.4.0)
90
89
  domain_name (0.5.20190701)
91
90
  unf (>= 0.0.5, < 1.0.0)
@@ -94,135 +93,126 @@ GEM
94
93
  ffi-compiler (1.0.1)
95
94
  ffi (>= 1.0.0)
96
95
  rake
97
- globalid (1.0.0)
98
- activesupport (>= 5.0)
99
- http (5.1.0)
96
+ globalid (0.4.2)
97
+ activesupport (>= 4.2.0)
98
+ http (5.0.4)
100
99
  addressable (~> 2.8)
101
100
  http-cookie (~> 1.0)
102
101
  http-form_data (~> 2.2)
103
102
  llhttp-ffi (~> 0.4.0)
104
- http-cookie (1.0.5)
103
+ http-cookie (1.0.4)
105
104
  domain_name (~> 0.5)
106
105
  http-form_data (2.3.0)
107
- i18n (1.12.0)
106
+ i18n (1.8.10)
108
107
  concurrent-ruby (~> 1.0)
109
- json (2.6.2)
110
108
  llhttp-ffi (0.4.0)
111
109
  ffi-compiler (~> 1.0)
112
110
  rake (~> 13.0)
113
- loofah (2.18.0)
111
+ loofah (2.12.0)
114
112
  crass (~> 1.0.2)
115
113
  nokogiri (>= 1.5.9)
116
114
  mail (2.7.1)
117
115
  mini_mime (>= 0.1.1)
118
116
  marcel (1.0.2)
119
117
  method_source (1.0.0)
120
- mini_mime (1.1.2)
121
- mini_portile2 (2.8.0)
122
- minitest (5.16.2)
123
- net-imap (0.2.3)
124
- digest
125
- net-protocol
126
- strscan
127
- net-pop (0.1.1)
128
- digest
129
- net-protocol
130
- timeout
131
- net-protocol (0.1.3)
132
- timeout
133
- net-smtp (0.3.1)
134
- digest
135
- net-protocol
136
- timeout
118
+ mini_mime (1.0.3)
119
+ mini_portile2 (2.6.1)
120
+ minitest (5.14.4)
137
121
  nio4r (2.5.8)
138
- nokogiri (1.13.7)
139
- mini_portile2 (~> 2.8.0)
140
- racc (~> 1.4)
141
- nokogiri (1.13.7-x86_64-darwin)
122
+ nokogiri (1.12.3)
123
+ mini_portile2 (~> 2.6.1)
142
124
  racc (~> 1.4)
143
- noticed (1.5.9)
125
+ noticed (1.5.7)
144
126
  http (>= 4.0.0)
145
127
  rails (>= 5.2.0)
146
- parallel (1.22.1)
147
- parser (3.1.2.0)
128
+ parallel (1.20.1)
129
+ parser (3.0.1.1)
148
130
  ast (~> 2.4.1)
149
- public_suffix (4.0.7)
150
- racc (1.6.0)
151
- rack (2.2.4)
152
- rack-test (2.0.2)
153
- rack (>= 1.3)
154
- rails (7.0.3.1)
155
- actioncable (= 7.0.3.1)
156
- actionmailbox (= 7.0.3.1)
157
- actionmailer (= 7.0.3.1)
158
- actionpack (= 7.0.3.1)
159
- actiontext (= 7.0.3.1)
160
- actionview (= 7.0.3.1)
161
- activejob (= 7.0.3.1)
162
- activemodel (= 7.0.3.1)
163
- activerecord (= 7.0.3.1)
164
- activestorage (= 7.0.3.1)
165
- activesupport (= 7.0.3.1)
131
+ pry (0.14.1)
132
+ coderay (~> 1.1)
133
+ method_source (~> 1.0)
134
+ public_suffix (4.0.6)
135
+ racc (1.5.2)
136
+ rack (2.2.3)
137
+ rack-test (1.1.0)
138
+ rack (>= 1.0, < 3)
139
+ rails (6.1.3.2)
140
+ actioncable (= 6.1.3.2)
141
+ actionmailbox (= 6.1.3.2)
142
+ actionmailer (= 6.1.3.2)
143
+ actionpack (= 6.1.3.2)
144
+ actiontext (= 6.1.3.2)
145
+ actionview (= 6.1.3.2)
146
+ activejob (= 6.1.3.2)
147
+ activemodel (= 6.1.3.2)
148
+ activerecord (= 6.1.3.2)
149
+ activestorage (= 6.1.3.2)
150
+ activesupport (= 6.1.3.2)
166
151
  bundler (>= 1.15.0)
167
- railties (= 7.0.3.1)
152
+ railties (= 6.1.3.2)
153
+ sprockets-rails (>= 2.0.0)
168
154
  rails-dom-testing (2.0.3)
169
155
  activesupport (>= 4.2.0)
170
156
  nokogiri (>= 1.6)
171
- rails-html-sanitizer (1.4.3)
157
+ rails-html-sanitizer (1.4.1)
172
158
  loofah (~> 2.3)
173
- railties (7.0.3.1)
174
- actionpack (= 7.0.3.1)
175
- activesupport (= 7.0.3.1)
159
+ railties (6.1.3.2)
160
+ actionpack (= 6.1.3.2)
161
+ activesupport (= 6.1.3.2)
176
162
  method_source
177
- rake (>= 12.2)
163
+ rake (>= 0.8.7)
178
164
  thor (~> 1.0)
179
- zeitwerk (~> 2.5)
180
- rainbow (3.1.1)
181
- rake (13.0.6)
182
- redis (4.7.1)
183
- regexp_parser (2.5.0)
165
+ rainbow (3.0.0)
166
+ rake (13.0.4)
167
+ redis (4.4.0)
168
+ regexp_parser (2.1.1)
184
169
  rexml (3.2.5)
185
- rubocop (1.31.2)
186
- json (~> 2.3)
170
+ rubocop (1.18.3)
187
171
  parallel (~> 1.10)
188
- parser (>= 3.1.0.0)
172
+ parser (>= 3.0.0.0)
189
173
  rainbow (>= 2.2.2, < 4.0)
190
174
  regexp_parser (>= 1.8, < 3.0)
191
- rexml (>= 3.2.5, < 4.0)
192
- rubocop-ast (>= 1.18.0, < 2.0)
175
+ rexml
176
+ rubocop-ast (>= 1.7.0, < 2.0)
193
177
  ruby-progressbar (~> 1.7)
194
178
  unicode-display_width (>= 1.4.0, < 3.0)
195
- rubocop-ast (1.19.1)
196
- parser (>= 3.1.1.0)
197
- rubocop-minitest (0.20.1)
179
+ rubocop-ast (1.7.0)
180
+ parser (>= 3.0.1.1)
181
+ rubocop-minitest (0.14.0)
198
182
  rubocop (>= 0.90, < 2.0)
199
183
  rubocop-rake (0.6.0)
200
184
  rubocop (~> 1.0)
201
185
  ruby-progressbar (1.11.0)
202
- sidekiq (6.5.3)
186
+ sidekiq (6.2.2)
203
187
  connection_pool (>= 2.2.2)
204
188
  rack (~> 2.0)
205
- redis (>= 4.5.0)
189
+ redis (>= 4.2.0)
206
190
  simplecov (0.21.2)
207
191
  docile (~> 1.1)
208
192
  simplecov-html (~> 0.11)
209
193
  simplecov_json_formatter (~> 0.1)
210
194
  simplecov-html (0.12.3)
211
- simplecov_json_formatter (0.1.4)
212
- sqlite3 (1.4.4)
213
- strscan (3.0.3)
214
- thor (1.2.1)
215
- timeout (0.3.0)
195
+ simplecov_json_formatter (0.1.3)
196
+ sprockets (4.0.3)
197
+ concurrent-ruby (~> 1.0)
198
+ rack (> 1, < 3)
199
+ sprockets-rails (3.4.2)
200
+ actionpack (>= 5.2)
201
+ activesupport (>= 5.2)
202
+ sprockets (>= 3.0.0)
203
+ sqlite3 (1.4.2)
204
+ thor (1.1.0)
216
205
  tzinfo (2.0.4)
217
206
  concurrent-ruby (~> 1.0)
218
207
  unf (0.1.4)
219
208
  unf_ext
220
- unf_ext (0.0.8.2)
221
- unicode-display_width (2.2.0)
209
+ unf_ext (0.0.8)
210
+ unicode-display_width (2.0.0)
211
+ warning (1.2.1)
222
212
  websocket-driver (0.7.5)
223
213
  websocket-extensions (>= 0.1.0)
224
214
  websocket-extensions (0.1.5)
225
- zeitwerk (2.6.0)
215
+ zeitwerk (2.4.2)
226
216
 
227
217
  PLATFORMS
228
218
  ruby
@@ -230,18 +220,22 @@ PLATFORMS
230
220
 
231
221
  DEPENDENCIES
232
222
  acidic_job!
223
+ activejob (~> 6.1.3.2)
224
+ activerecord (~> 6.1.3.2)
233
225
  combustion
234
- minitest
235
- net-smtp
226
+ database_cleaner
227
+ minitest (~> 5.0)
236
228
  noticed
237
- railties
238
- rake
239
- rubocop
229
+ pry
230
+ railties (>= 6.1.0)
231
+ rake (~> 13.0)
232
+ rubocop (~> 1.7)
240
233
  rubocop-minitest
241
234
  rubocop-rake
242
235
  sidekiq
243
236
  simplecov
244
237
  sqlite3
238
+ warning
245
239
 
246
240
  BUNDLED WITH
247
- 2.3.19
241
+ 2.2.31