sidekiq-scheduler 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/sidekiq/scheduler.rb +2 -1
- data/lib/sidekiq-scheduler/schedule.rb +2 -1
- data/lib/sidekiq-scheduler/version.rb +1 -1
- data/lib/sidekiq-scheduler/web.rb +1 -1
- data/web/locales/zh-cn.yml +11 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28711a6519af87dbfd27167ac41f003848c64bf2
|
4
|
+
data.tar.gz: f056bd26bfbc6ff0cc85b1eaa5426e96ec87c0ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4bf1f9fbd8d31be38929bc6f8986f142e66a6e09fdabe011dd3ea912232de27b472c4be069c303b35a49cf7a394fa7f503c6c4053a71540d402a39c85191e6d
|
7
|
+
data.tar.gz: bbc4ca2d403a216973b6d95551de01af1c78d482e8464720b487a6cdafdb2d6204b63cc4f70aec7a4597856d0b5fe84bdf164a917fcd6c275e43d68def4a0361
|
data/README.md
CHANGED
@@ -81,7 +81,7 @@ if Rails.env == 'production' && (defined?(Rails::Server) || defined?(Unicorn))
|
|
81
81
|
Sidekiq.configure_server do |config|
|
82
82
|
|
83
83
|
config.on(:startup) do
|
84
|
-
Sidekiq.schedule = YAML.load_file(File.expand_path('../../
|
84
|
+
Sidekiq.schedule = YAML.load_file(File.expand_path('../../scheduler.yml', __FILE__))
|
85
85
|
Sidekiq::Scheduler.reload_schedule!
|
86
86
|
end
|
87
87
|
end
|
@@ -156,7 +156,7 @@ require 'sidekiq/scheduler'
|
|
156
156
|
|
157
157
|
Sidekiq.configure_server do |config|
|
158
158
|
config.on(:startup) do
|
159
|
-
Sidekiq.schedule = YAML.load_file(File.expand_path(
|
159
|
+
Sidekiq.schedule = YAML.load_file(File.expand_path('../../sidekiq_scheduler.yml', __FILE__))
|
160
160
|
Sidekiq::Scheduler.reload_schedule!
|
161
161
|
end
|
162
162
|
end
|
@@ -166,11 +166,11 @@ If you are running a non Rails project you should add code to load the workers c
|
|
166
166
|
|
167
167
|
```ruby
|
168
168
|
require 'sidekiq/scheduler'
|
169
|
-
Dir[File.expand_path('
|
169
|
+
Dir[File.expand_path('../../../lib/workers/*.rb', __FILE__)].each do |file| load file; end
|
170
170
|
|
171
171
|
Sidekiq.configure_server do |config|
|
172
172
|
config.on(:startup) do
|
173
|
-
Sidekiq.schedule = YAML.load_file(File.expand_path("../../
|
173
|
+
Sidekiq.schedule = YAML.load_file(File.expand_path("../../scheduler.yml", __FILE__))
|
174
174
|
Sidekiq::Scheduler.reload_schedule!
|
175
175
|
end
|
176
176
|
end
|
data/lib/sidekiq/scheduler.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'hashwithindifferentaccess'
|
1
2
|
require 'rufus/scheduler'
|
2
3
|
require 'thwait'
|
3
4
|
require 'sidekiq/util'
|
@@ -60,7 +61,7 @@ module Sidekiq
|
|
60
61
|
logger.info 'Schedule empty! Set Sidekiq.schedule' if Sidekiq.schedule.empty?
|
61
62
|
|
62
63
|
|
63
|
-
@@scheduled_jobs =
|
64
|
+
@@scheduled_jobs = HashWithIndifferentAccess.new
|
64
65
|
|
65
66
|
Sidekiq.schedule.each do |name, config|
|
66
67
|
if !listened_queues_only || enabled_queue?(config['queue'])
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'hashwithindifferentaccess'
|
1
2
|
require 'multi_json'
|
2
3
|
|
3
4
|
module SidekiqScheduler
|
@@ -117,7 +118,7 @@ module SidekiqScheduler
|
|
117
118
|
private
|
118
119
|
|
119
120
|
def prepare_schedule(schedule_hash)
|
120
|
-
prepared_hash =
|
121
|
+
prepared_hash = HashWithIndifferentAccess.new
|
121
122
|
schedule_hash.each do |name, job_spec|
|
122
123
|
job_spec = job_spec.dup
|
123
124
|
job_spec['class'] = name unless job_spec.key?('class') || job_spec.key?(:class)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morton Jonuschat
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|
@@ -81,6 +81,20 @@ dependencies:
|
|
81
81
|
- - '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 1.4.0
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: hashwithindifferentaccess
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: rake
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,6 +253,7 @@ files:
|
|
239
253
|
- web/views/recurring_jobs.erb
|
240
254
|
- web/locales/cs.yml
|
241
255
|
- web/locales/en.yml
|
256
|
+
- web/locales/zh-cn.yml
|
242
257
|
- web/locales/es.yml
|
243
258
|
- MIT-LICENSE
|
244
259
|
- Rakefile
|