mini_scheduler 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/gemfiles/sidekiq-6.5.gemfile +6 -0
- data/gemfiles/sidekiq-7.0.gemfile +6 -0
- data/gemfiles/sidekiq-7.1.gemfile +6 -0
- data/gemfiles/sidekiq-7.2.gemfile +6 -0
- data/gemfiles/sidekiq-7.3.gemfile +6 -0
- data/lib/mini_scheduler/manager.rb +2 -2
- data/lib/mini_scheduler/version.rb +1 -1
- data/lib/mini_scheduler.rb +8 -10
- data/mini_scheduler.gemspec +2 -2
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b5d08632e54389302df347b8c5c938b7d3693d63c126009b537a0a26532c239
|
4
|
+
data.tar.gz: 5db6eea6cae5c21efec10310b87e0ab4d8f7211512467547cae56e6888cbcf55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e3d947fa7227bc58774576778f5e42989bb1adcc5e28fc891a5faef504ac30e49a455216fdecbb5d7861fe21574e3db7ec4adb6a9e12ac006916374f9f4cc53
|
7
|
+
data.tar.gz: e3c519534c28c36f5067c02eb12953d64e7a41e96b45fb8da7d7aee05cbfc83906139be971a5681468f3bbbbab8b04cf5424997f2f829ad217a3f9a7150f452a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.18.0 - 2024-12-20
|
2
|
+
|
3
|
+
- Add support for Sidekiq 7+
|
4
|
+
- Remove support for Sidekiq < 6.5
|
5
|
+
- Update minimum Ruby version to 3.0
|
6
|
+
|
1
7
|
# 0.17.0 - 2024-08-06
|
2
8
|
|
3
9
|
- Add `MiniScheduler::Manager.discover_running_scheduled_jobs` API to allow running scheduled jobs to easily be discovered on the
|
data/lib/mini_scheduler.rb
CHANGED
@@ -5,6 +5,7 @@ require "mini_scheduler/schedule_info"
|
|
5
5
|
require "mini_scheduler/manager"
|
6
6
|
require "mini_scheduler/distributed_mutex"
|
7
7
|
require "sidekiq"
|
8
|
+
require "redis"
|
8
9
|
|
9
10
|
begin
|
10
11
|
require "sidekiq/exception_handler"
|
@@ -16,26 +17,23 @@ module MiniScheduler
|
|
16
17
|
yield self
|
17
18
|
end
|
18
19
|
|
19
|
-
|
20
|
-
if defined?(Sidekiq
|
21
|
-
|
22
|
-
else
|
23
|
-
|
24
|
-
Sidekiq.handle_exception(exception, context)
|
25
|
-
end
|
20
|
+
SidekiqExceptionHandler =
|
21
|
+
if defined?(Sidekiq.default_configuration) # Sidekiq 7+
|
22
|
+
->(ex, ctx, _config = nil) { Sidekiq.default_configuration.handle_exception(ex, ctx) }
|
23
|
+
else # Sidekiq 6.5
|
24
|
+
->(ex, ctx, _config = nil) { Sidekiq.handle_exception(ex, ctx) }
|
26
25
|
end
|
27
|
-
end
|
28
26
|
|
29
27
|
def self.job_exception_handler(&blk)
|
30
28
|
@job_exception_handler = blk if blk
|
31
29
|
@job_exception_handler
|
32
30
|
end
|
33
31
|
|
34
|
-
def self.handle_job_exception(ex, context = {})
|
32
|
+
def self.handle_job_exception(ex, context = {}, _config = nil)
|
35
33
|
if job_exception_handler
|
36
34
|
job_exception_handler.call(ex, context)
|
37
35
|
else
|
38
|
-
SidekiqExceptionHandler.
|
36
|
+
SidekiqExceptionHandler.call(ex, context)
|
39
37
|
end
|
40
38
|
end
|
41
39
|
|
data/mini_scheduler.gemspec
CHANGED
@@ -15,12 +15,12 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.homepage = "https://github.com/discourse/mini_scheduler"
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
|
-
spec.required_ruby_version = ">=
|
18
|
+
spec.required_ruby_version = ">= 3.0.0"
|
19
19
|
|
20
20
|
spec.files = `git ls-files`.split($/).reject { |s| s =~ /^(spec|\.)/ }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_runtime_dependency "sidekiq", ">=
|
23
|
+
spec.add_runtime_dependency "sidekiq", ">= 6.5", "< 8.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "pg", "~> 1.0"
|
26
26
|
spec.add_development_dependency "activesupport", "~> 7.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|
@@ -17,20 +17,20 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '6.5'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '8.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: '6.5'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '8.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: pg
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +184,11 @@ files:
|
|
184
184
|
- README.md
|
185
185
|
- Rakefile
|
186
186
|
- app/models/mini_scheduler/stat.rb
|
187
|
+
- gemfiles/sidekiq-6.5.gemfile
|
188
|
+
- gemfiles/sidekiq-7.0.gemfile
|
189
|
+
- gemfiles/sidekiq-7.1.gemfile
|
190
|
+
- gemfiles/sidekiq-7.2.gemfile
|
191
|
+
- gemfiles/sidekiq-7.3.gemfile
|
187
192
|
- lib/generators/mini_scheduler/install/install_generator.rb
|
188
193
|
- lib/generators/mini_scheduler/install/templates/create_mini_scheduler_stats.rb
|
189
194
|
- lib/generators/mini_scheduler/install/templates/mini_scheduler_initializer.rb
|
@@ -210,14 +215,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
215
|
requirements:
|
211
216
|
- - ">="
|
212
217
|
- !ruby/object:Gem::Version
|
213
|
-
version:
|
218
|
+
version: 3.0.0
|
214
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
220
|
requirements:
|
216
221
|
- - ">="
|
217
222
|
- !ruby/object:Gem::Version
|
218
223
|
version: '0'
|
219
224
|
requirements: []
|
220
|
-
rubygems_version: 3.5.
|
225
|
+
rubygems_version: 3.5.22
|
221
226
|
signing_key:
|
222
227
|
specification_version: 4
|
223
228
|
summary: Adds recurring jobs for Sidekiq
|