sidekiq-dejavu 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +20 -8
- data/lib/sidekiq/dejavu/manager.rb +9 -1
- data/lib/sidekiq/dejavu/version.rb +1 -1
- data/lib/sidekiq-dejavu.rb +1 -1
- data/sidekiq-dejavu.gemspec +2 -2
- data/test/helper.rb +1 -1
- metadata +12 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a280b94512a2f87340bc0edba893acd85f65be529a212533f6dc1360bce4f9c6
|
4
|
+
data.tar.gz: f36fdd3b2aa433d0cb2f82792d2e9244ecd0957d9712657e76a114f6a2d0fa61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dfb6dda6f70a068d4ecc8691457d1e6e8c932f9f2729780b19522d01bdc24fa4b4be0dd8dfd4b56d9597928bf4c523057fc11f95a5baa0026e2550a808e5708
|
7
|
+
data.tar.gz: df169033e309eb1807b002171d5bb2802ee43d9085953546dcaad3338210d519782086011715aa3f13012fb75634b0a0253784d7456cf2d2591b57985a64423c
|
data/.travis.yml
CHANGED
@@ -4,16 +4,28 @@ cache: bundler
|
|
4
4
|
services:
|
5
5
|
- redis-server
|
6
6
|
rvm:
|
7
|
-
- 2.1
|
8
7
|
- 2.0.0
|
9
|
-
- 2.
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
8
|
+
- 2.1.10
|
9
|
+
- 2.2.7
|
10
|
+
- 2.3.4
|
11
|
+
- 2.4.1
|
12
|
+
- jruby-1.7.26
|
13
|
+
- jruby-9.1.9.0
|
13
14
|
env:
|
14
15
|
- SIDEKIQ='~> 3.5'
|
15
16
|
- SIDEKIQ='~> 4.0'
|
17
|
+
- SIDEKIQ='~> 5.0'
|
16
18
|
matrix:
|
17
|
-
|
18
|
-
- rvm:
|
19
|
-
|
19
|
+
exclude:
|
20
|
+
- rvm: 2.0.0
|
21
|
+
env: SIDEKIQ='~> 5.0'
|
22
|
+
- rvm: 2.1.10
|
23
|
+
env: SIDEKIQ='~> 5.0'
|
24
|
+
- rvm: jruby-1.7.26
|
25
|
+
env: SIDEKIQ='~> 4.0'
|
26
|
+
- rvm: jruby-1.7.26
|
27
|
+
env: SIDEKIQ='~> 5.0'
|
28
|
+
- rvm: jruby-9.1.9.0
|
29
|
+
env: SIDEKIQ='~> 3.5'
|
30
|
+
- rvm: jruby-9.1.9.0
|
31
|
+
env: SIDEKIQ='~> 4.0'
|
@@ -6,7 +6,7 @@ module Sidekiq
|
|
6
6
|
attr_accessor :schedules, :scheduled_set
|
7
7
|
|
8
8
|
def initialize(schedules = {}, scheduled_set = Sidekiq::ScheduledSet.new)
|
9
|
-
@schedules = schedules
|
9
|
+
@schedules = deep_transform_keys_to_strings(schedules)
|
10
10
|
@scheduled_set = scheduled_set
|
11
11
|
end
|
12
12
|
|
@@ -21,6 +21,14 @@ module Sidekiq
|
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
+
def deep_transform_keys_to_strings(hash)
|
25
|
+
hash.each_with_object({}) do |(key, value), obj|
|
26
|
+
new_key = key.to_s
|
27
|
+
new_value = value.is_a?(Hash) ? deep_transform_keys_to_strings(value) : value
|
28
|
+
obj[new_key] = new_value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
24
32
|
def clear_changed_schedules
|
25
33
|
scheduled_jobs.each do |job|
|
26
34
|
item = job.item
|
data/lib/sidekiq-dejavu.rb
CHANGED
@@ -7,7 +7,7 @@ Sidekiq.configure_server do |config|
|
|
7
7
|
end
|
8
8
|
|
9
9
|
config.on(:startup) do
|
10
|
-
schedules = config.options[:schedule] || {}
|
10
|
+
schedules = (config.respond_to?(:[]) ? config[:schedule] : config.options[:schedule]) || {}
|
11
11
|
Sidekiq.logger.debug "Sidekiq::Dejavu: schedules: #{schedules.inspect}"
|
12
12
|
if schedules.empty?
|
13
13
|
Sidekiq.logger.warn "Sidekiq::Dejavu: No schedule found."
|
data/sidekiq-dejavu.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "sidekiq", ">= 3", "<
|
21
|
+
spec.add_dependency "sidekiq", ">= 3", "< 8"
|
22
22
|
spec.add_dependency "parse-cron", "~> 0.1.4"
|
23
|
-
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "bundler"
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
end
|
data/test/helper.rb
CHANGED
@@ -28,7 +28,7 @@ Sidekiq::Testing.server_middleware do |chain|
|
|
28
28
|
chain.add Sidekiq::Dejavu::Middleware::Server::Scheduler
|
29
29
|
end
|
30
30
|
|
31
|
-
class Sidekiq::Dejavu::Test <
|
31
|
+
class Sidekiq::Dejavu::Test < Minitest::Test
|
32
32
|
attr_reader :log, :scheduled_set
|
33
33
|
|
34
34
|
def setup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-dejavu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Buenemann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: parse-cron
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -48,16 +48,16 @@ dependencies:
|
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,7 +101,7 @@ homepage: https://github.com/felixbuenemann/sidekiq-dejavu
|
|
101
101
|
licenses:
|
102
102
|
- MIT
|
103
103
|
metadata: {}
|
104
|
-
post_install_message:
|
104
|
+
post_install_message:
|
105
105
|
rdoc_options: []
|
106
106
|
require_paths:
|
107
107
|
- lib
|
@@ -116,9 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
|
120
|
-
|
121
|
-
signing_key:
|
119
|
+
rubygems_version: 3.1.6
|
120
|
+
signing_key:
|
122
121
|
specification_version: 4
|
123
122
|
summary: Dejavu is a clockless scheduler that uses Sidekiq's built-in scheduling
|
124
123
|
test_files:
|