sidekiq-robust-job 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16456089ded6f826bcb4d0c9e1c2538dbf577a2204b512204f7228553cfe2405
4
- data.tar.gz: 96b63fb47b131378d8409c3e0022b78749e8ca9f231ceb469fdd8a21af282416
3
+ metadata.gz: 4ae0b509be740c96eeac6f7e83b717d5d53fd0b26cdff4174f07c6ffa1e90092
4
+ data.tar.gz: e981dad74a923463ee9d458fc44df440c945029b5f5afa08f5b70f66f4e0738c
5
5
  SHA512:
6
- metadata.gz: c78e1907f15a9c881273c4e8f26a0937bd8233267e358aeb374fe91a5b68db28191e9a863a7c7761e5c6ff0994dd6c3ae57cf94c191f93b81b2a1ee88e24715e
7
- data.tar.gz: a901ad322c8e4a370ea2bf84e6ceb42c44930c1cd9804c0a23ad2e9230979b8ede1b13466e3dc38561bbe3c79a7d48be57aa40991044bde1f2ca6f8fbff8b0b1
6
+ metadata.gz: 8227e4b1c295c8479071c3939e9ccc174e06cb4f11e84cbc36509d19cf49dbd0d6085fcd64ca903350049a71941370f54b941fb393a79be9541b68f1f3feb4e8
7
+ data.tar.gz: c0de8095a6d8515f0cf30c65f0c8b9a15c0f18db8478311db4a1f251a83a29e67c53850aacff8f95a6e44559fb44291e1e03093ded11edd9fabb2061a6eefcd2
@@ -0,0 +1,61 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+
12
+ services:
13
+ postgres:
14
+ image: postgres:16
15
+ env:
16
+ POSTGRES_PASSWORD: postgres
17
+ options: >-
18
+ --health-cmd pg_isready
19
+ --health-interval 10s
20
+ --health-timeout 5s
21
+ --health-retries 5
22
+ ports:
23
+ - 5432:5432
24
+ redis:
25
+ image: redis:7
26
+ options: >-
27
+ --health-cmd "redis-cli ping"
28
+ --health-interval 10s
29
+ --health-timeout 5s
30
+ --health-retries 5
31
+ ports:
32
+ - 6379:6379
33
+
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ include:
38
+ - ruby: "3.3"
39
+ gemfile: gemfiles/sidekiq_cron_1.gemfile
40
+ rails_version: "~> 7.1.0"
41
+ - ruby: "3.4"
42
+ gemfile: gemfiles/sidekiq_cron_2.gemfile
43
+ rails_version: "~> 8.0.0"
44
+ - ruby: "4.0"
45
+ gemfile: gemfiles/sidekiq_cron_2.gemfile
46
+ rails_version: "~> 8.1.0"
47
+
48
+ env:
49
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
50
+ RAILS_VERSION: ${{ matrix.rails_version }}
51
+ PGHOST: localhost
52
+ PGUSER: postgres
53
+ PGPASSWORD: postgres
54
+
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: ruby/setup-ruby@v1
58
+ with:
59
+ ruby-version: ${{ matrix.ruby }}
60
+ bundler-cache: true
61
+ - run: bundle exec rspec
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ sidekiq-robust-job
data/Changelog.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.0.0
6
+ - Require at least ActiveRecord 7.1, support sidekiq-cron 2.x
7
+
5
8
  ## 0.3.0
6
9
  - Fix `enqueue_conflict_resolution_strategies` to work well with `until_executing` strategy. Handles corner case when job is being processed, yet we can't enqueue another one
7
10
  - Introduce `while_executing` uniqueness strategy, which is basically execution mutex - ensures only that 2 jobs are not executed in parallel, without considering enqueueing uniqueness.
data/README.md CHANGED
@@ -224,7 +224,11 @@ Recommended especially when you don't use Sidekiq Pro's `super_fetch`. If you de
224
224
  If you want to take advantage of this feature, just add the job to schedule (based on [sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron)):
225
225
 
226
226
  ``` rb
227
- SidekiqRobustJob.schedule_missed_jobs_handling
227
+ Sidekiq.configure_server do |config|
228
+ config.on(:startup) do
229
+ SidekiqRobustJob.schedule_missed_jobs_handling
230
+ end
231
+ end
228
232
  ```
229
233
 
230
234
  By default, the job will be executed every 3 hours. It is going to look for the jobs created more than 3 hours ago that are still not completed or not dropped and reschedule them. You can customize both how often the job is executed and when the job should be considered to be missed:
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "sidekiq-cron", "~> 1.0"
8
+
9
+ rails_version = ENV.fetch("RAILS_VERSION", "~> 7.1.0")
10
+ gem "activerecord", rails_version
11
+ gem "railties", rails_version
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "sidekiq-cron", "~> 2.0"
8
+
9
+ rails_version = ENV.fetch("RAILS_VERSION", "~> 8.1.0")
10
+ gem "activerecord", rails_version
11
+ gem "railties", rails_version
@@ -1,7 +1,7 @@
1
1
  module Sidekiq
2
2
  module Robust
3
3
  module Job
4
- VERSION = "0.3.0"
4
+ VERSION = "1.0.0"
5
5
  end
6
6
  end
7
7
  end
@@ -21,7 +21,7 @@ require "sidekiq_robust_job/uniqueness_strategy/no_uniqueness"
21
21
  require "sidekiq_robust_job/uniqueness_strategy/until_executed"
22
22
  require "sidekiq_robust_job/uniqueness_strategy/until_executing"
23
23
  require "sidekiq_robust_job/uniqueness_strategy/while_executing"
24
- require "sidekiq/cron/job"
24
+ require "sidekiq-cron"
25
25
  require "sidekiq"
26
26
  require "active_support/concern"
27
27
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.description = %q{A gem making Sidekiq jobs fully durable with some extra features}
11
11
  spec.homepage = "https://github.com/BookingSync/sidekiq-robust-job"
12
12
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
14
14
 
15
15
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
16
16
 
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_dependency "sidekiq", ">= 5"
31
- spec.add_dependency "sidekiq-cron", "~> 1"
31
+ spec.add_dependency "sidekiq-cron", ">= 1"
32
32
  spec.add_dependency "activesupport", ">= 5"
33
33
 
34
34
  spec.add_development_dependency "rake", "~> 13.0"
@@ -36,7 +36,8 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "rspec-sidekiq"
37
37
  spec.add_development_dependency "timecop"
38
38
  spec.add_development_dependency "shoulda-matchers"
39
- spec.add_development_dependency "activerecord", "~> 5"
39
+ spec.add_development_dependency "activerecord", ">= 7.1"
40
+ spec.add_development_dependency "railties", ">= 7.1"
40
41
  spec.add_development_dependency "pg"
41
42
  spec.add_development_dependency "factory_bot_rails"
42
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-robust-job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Galanciak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-14 00:00:00.000000000 Z
11
+ date: 2026-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: sidekiq-cron
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1'
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
40
  version: '1'
41
41
  - !ruby/object:Gem::Dependency
@@ -126,16 +126,30 @@ dependencies:
126
126
  name: activerecord
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '5'
131
+ version: '7.1'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '5'
138
+ version: '7.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: railties
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '7.1'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '7.1'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: pg
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -171,17 +185,20 @@ executables: []
171
185
  extensions: []
172
186
  extra_rdoc_files: []
173
187
  files:
188
+ - ".github/workflows/ci.yml"
174
189
  - ".gitignore"
175
190
  - ".rspec"
191
+ - ".ruby-gemset"
176
192
  - ".travis.yml"
177
193
  - Changelog.md
178
194
  - Gemfile
179
- - Gemfile.lock
180
195
  - LICENSE.txt
181
196
  - README.md
182
197
  - Rakefile
183
198
  - bin/console
184
199
  - bin/setup
200
+ - gemfiles/sidekiq_cron_1.gemfile
201
+ - gemfiles/sidekiq_cron_2.gemfile
185
202
  - lib/sidekiq-robust-job.rb
186
203
  - lib/sidekiq/robust/job.rb
187
204
  - lib/sidekiq/robust/job/version.rb
@@ -225,14 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
242
  requirements:
226
243
  - - ">="
227
244
  - !ruby/object:Gem::Version
228
- version: 2.3.0
245
+ version: 3.1.0
229
246
  required_rubygems_version: !ruby/object:Gem::Requirement
230
247
  requirements:
231
248
  - - ">="
232
249
  - !ruby/object:Gem::Version
233
250
  version: '0'
234
251
  requirements: []
235
- rubygems_version: 3.2.22
252
+ rubygems_version: 3.5.22
236
253
  signing_key:
237
254
  specification_version: 4
238
255
  summary: A gem making Sidekiq jobs fully durable with some extra features
data/Gemfile.lock DELETED
@@ -1,127 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sidekiq-robust-job (0.3.0)
5
- activesupport (>= 5)
6
- sidekiq (>= 5)
7
- sidekiq-cron (~> 1)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actionpack (5.2.4.5)
13
- actionview (= 5.2.4.5)
14
- activesupport (= 5.2.4.5)
15
- rack (~> 2.0, >= 2.0.8)
16
- rack-test (>= 0.6.3)
17
- rails-dom-testing (~> 2.0)
18
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.2.4.5)
20
- activesupport (= 5.2.4.5)
21
- builder (~> 3.1)
22
- erubi (~> 1.4)
23
- rails-dom-testing (~> 2.0)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activemodel (5.2.4.5)
26
- activesupport (= 5.2.4.5)
27
- activerecord (5.2.4.5)
28
- activemodel (= 5.2.4.5)
29
- activesupport (= 5.2.4.5)
30
- arel (>= 9.0)
31
- activesupport (5.2.4.5)
32
- concurrent-ruby (~> 1.0, >= 1.0.2)
33
- i18n (>= 0.7, < 2)
34
- minitest (~> 5.1)
35
- tzinfo (~> 1.1)
36
- arel (9.0.0)
37
- builder (3.2.4)
38
- concurrent-ruby (1.1.9)
39
- connection_pool (2.2.3)
40
- crass (1.0.6)
41
- diff-lcs (1.4.4)
42
- erubi (1.10.0)
43
- et-orbi (1.2.7)
44
- tzinfo
45
- factory_bot (6.1.0)
46
- activesupport (>= 5.0.0)
47
- factory_bot_rails (6.1.0)
48
- factory_bot (~> 6.1.0)
49
- railties (>= 5.0.0)
50
- fugit (1.5.3)
51
- et-orbi (~> 1, >= 1.2.7)
52
- raabro (~> 1.4)
53
- i18n (1.8.10)
54
- concurrent-ruby (~> 1.0)
55
- loofah (2.10.0)
56
- crass (~> 1.0.2)
57
- nokogiri (>= 1.5.9)
58
- method_source (1.0.0)
59
- mini_portile2 (2.4.0)
60
- minitest (5.14.4)
61
- nokogiri (1.10.10)
62
- mini_portile2 (~> 2.4.0)
63
- pg (1.2.3)
64
- raabro (1.4.0)
65
- rack (2.2.3)
66
- rack-test (1.1.0)
67
- rack (>= 1.0, < 3)
68
- rails-dom-testing (2.0.3)
69
- activesupport (>= 4.2.0)
70
- nokogiri (>= 1.6)
71
- rails-html-sanitizer (1.3.0)
72
- loofah (~> 2.3)
73
- railties (5.2.4.5)
74
- actionpack (= 5.2.4.5)
75
- activesupport (= 5.2.4.5)
76
- method_source
77
- rake (>= 0.8.7)
78
- thor (>= 0.19.0, < 2.0)
79
- rake (13.0.1)
80
- redis (4.2.3)
81
- rspec (3.10.0)
82
- rspec-core (~> 3.10.0)
83
- rspec-expectations (~> 3.10.0)
84
- rspec-mocks (~> 3.10.0)
85
- rspec-core (3.10.0)
86
- rspec-support (~> 3.10.0)
87
- rspec-expectations (3.10.0)
88
- diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.10.0)
90
- rspec-mocks (3.10.0)
91
- diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.10.0)
93
- rspec-sidekiq (3.1.0)
94
- rspec-core (~> 3.0, >= 3.0.0)
95
- sidekiq (>= 2.4.0)
96
- rspec-support (3.10.0)
97
- shoulda-matchers (4.4.1)
98
- activesupport (>= 4.2.0)
99
- sidekiq (6.1.2)
100
- connection_pool (>= 2.2.2)
101
- rack (~> 2.0)
102
- redis (>= 4.2.0)
103
- sidekiq-cron (1.3.0)
104
- fugit (>= 1.1)
105
- sidekiq (>= 4.2.1)
106
- thor (1.1.0)
107
- thread_safe (0.3.6)
108
- timecop (0.9.2)
109
- tzinfo (1.2.9)
110
- thread_safe (~> 0.1)
111
-
112
- PLATFORMS
113
- ruby
114
-
115
- DEPENDENCIES
116
- activerecord (~> 5)
117
- factory_bot_rails
118
- pg
119
- rake (~> 13.0)
120
- rspec (~> 3.0)
121
- rspec-sidekiq
122
- shoulda-matchers
123
- sidekiq-robust-job!
124
- timecop
125
-
126
- BUNDLED WITH
127
- 2.2.22