resque-scheduler 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of resque-scheduler might be problematic. Click here for more details.
- checksums.yaml +8 -8
- data/AUTHORS.md +1 -0
- data/HISTORY.md +7 -0
- data/README.md +37 -15
- data/lib/resque/scheduler.rb +12 -4
- data/lib/resque/scheduler/cli.rb +1 -1
- data/lib/resque/scheduler/delaying_extensions.rb +9 -9
- data/lib/resque/scheduler/server/views/scheduler.erb +1 -0
- data/lib/resque/scheduler/version.rb +1 -1
- data/resque-scheduler.gemspec +1 -1
- data/test/scheduler_args_test.rb +8 -8
- data/test/scheduler_test.rb +34 -14
- metadata +3 -4
- data/ROADMAP.md +0 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWQ5NjY1MDg2NGNmODVkNWQxZDNmOWJjNzAxMWRjMGNjZWFhM2RiNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWZiZjMwYWRkMzRlOWQxYzViN2EzOGU0MDAwMTAzMTM4NTY5OTNkZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWY0MjRlNjcyOWZjODM5YWNlYjFlNDM5ZGU1NjFjYmQwZDQ2NDY0YWFiMmJh
|
10
|
+
ZTkwMWJiYzljMGQ4MTI1MDY0NjA2ZWM1NGNjNjgwZDU1ZTIxZDk4N2ZmNjk4
|
11
|
+
ZWFjZjhkOTEyOWJmMDQ2YjBiY2MxMzBkYTg1ZjEzOGYzZDJhNDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTQ4NjVhMjZjYTEwMDYyOGMwODBkMmQ2MGUyNDIzYTgyNjI1NmNhZjg2MzRm
|
14
|
+
NWI3Mjk2MGM4N2E2MjhkY2IwNjlkYjZlYWZmY2Q2ZTFhY2Y0ZWUxNmY3MmM4
|
15
|
+
ODkwZjE3MjljOTVlZWM2ZjZhZmRmMTQwYjM3ZDk0OGFmNTA3ODY=
|
data/AUTHORS.md
CHANGED
data/HISTORY.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Resque Scheduler History / ChangeLog / Release Notes
|
2
2
|
|
3
|
+
## 4.0.0 (2014-12-21)
|
4
|
+
* Bump rufus-scheduler dependency to `~> 3.0`
|
5
|
+
* Address warning from redis-namespace related to `#unwatch`
|
6
|
+
* Show current master in the web UI
|
7
|
+
* Bugfix related to schedule check when no jobs are in the queue
|
8
|
+
* Documentation updates
|
9
|
+
|
3
10
|
## 3.1.0 (2014-12-21)
|
4
11
|
* Note in README.md about production redis deployment configuration
|
5
12
|
* Bugfix to only override configuration options if provided
|
data/README.md
CHANGED
@@ -11,14 +11,6 @@ resque-scheduler
|
|
11
11
|
Resque-scheduler is an extension to [Resque](http://github.com/resque/resque)
|
12
12
|
that adds support for queueing items in the future.
|
13
13
|
|
14
|
-
This table explains the version requirements for redis
|
15
|
-
|
16
|
-
| resque-scheduler version | required redis gem version|
|
17
|
-
|:-------------------------|----------------------:|
|
18
|
-
| ~> 2.0 | >= 3.0.0 |
|
19
|
-
| >= 0.0.1 | ~> 1.3 |
|
20
|
-
|
21
|
-
|
22
14
|
Job scheduling is supported in two different way: Recurring (scheduled) and
|
23
15
|
Delayed.
|
24
16
|
|
@@ -71,10 +63,13 @@ require 'resque/scheduler/tasks'
|
|
71
63
|
namespace :resque do
|
72
64
|
task :setup do
|
73
65
|
require 'resque'
|
74
|
-
require 'resque-scheduler'
|
75
66
|
|
76
67
|
# you probably already have this somewhere
|
77
68
|
Resque.redis = 'localhost:6379'
|
69
|
+
end
|
70
|
+
|
71
|
+
task :setup_schedule => :setup do
|
72
|
+
require 'resque-scheduler'
|
78
73
|
|
79
74
|
# If you want to be able to dynamically change the schedule,
|
80
75
|
# uncomment this line. A dynamic schedule can be updated via the
|
@@ -95,6 +90,8 @@ namespace :resque do
|
|
95
90
|
# So, something like this:
|
96
91
|
require 'jobs'
|
97
92
|
end
|
93
|
+
|
94
|
+
task :scheduler_setup => :setup_schedule
|
98
95
|
end
|
99
96
|
```
|
100
97
|
|
@@ -463,7 +460,9 @@ run, leading to undesired behaviour. To allow different scheduler configs run at
|
|
463
460
|
on one redis, you can either namespace your redis connections, or supply an environment variable
|
464
461
|
to split the shared lock key resque-scheduler uses thus:
|
465
462
|
|
466
|
-
|
463
|
+
``` bash
|
464
|
+
RESQUE_SCHEDULER_MASTER_LOCK_PREFIX=MyApp: rake resque:scheduler
|
465
|
+
```
|
467
466
|
|
468
467
|
### resque-web Additions
|
469
468
|
|
@@ -601,11 +600,34 @@ vagrant up
|
|
601
600
|
|
602
601
|
### Deployment Notes
|
603
602
|
|
604
|
-
It is recommended that a production deployment of
|
605
|
-
a dedicated Redis database. While making and managing scheduled tasks,
|
606
|
-
|
607
|
-
and stability issues if
|
608
|
-
number of keys (such as those written by a different system
|
603
|
+
It is recommended that a production deployment of `resque-scheduler` be hosted
|
604
|
+
on a dedicated Redis database. While making and managing scheduled tasks,
|
605
|
+
`resque-scheduler` currently scans the entire Redis keyspace, which may cause
|
606
|
+
latency and stability issues if `resque-scheduler` is hosted on a Redis instance
|
607
|
+
storing a large number of keys (such as those written by a different system
|
608
|
+
hosted on the same Redis instance).
|
609
|
+
|
610
|
+
#### Compatibility Notes
|
611
|
+
|
612
|
+
Different versions of the `redis` and `rufus-scheduler` gems are needed
|
613
|
+
depending on your version of `resque-scheduler`. This is typically not a
|
614
|
+
problem with `resque-scheduler` itself, but when mixing dependencies with an
|
615
|
+
existing application.
|
616
|
+
|
617
|
+
This table explains the version requirements for redis gem
|
618
|
+
|
619
|
+
| resque-scheduler | redis gem |
|
620
|
+
|:-----------------|-----------:|
|
621
|
+
| `~> 2.0` | `>= 3.0.0` |
|
622
|
+
| `>= 0.0.1` | `~> 1.3` |
|
623
|
+
|
624
|
+
This table explains the version requirements for rufus-scheduler
|
625
|
+
|
626
|
+
| resque-scheduler | rufus-scheduler |
|
627
|
+
|:-----------------|----------------:|
|
628
|
+
| `~> 4.0` | `~> 3.0` |
|
629
|
+
| `< 4.0` | `~> 2.0` |
|
630
|
+
|
609
631
|
|
610
632
|
### Contributing
|
611
633
|
|
data/lib/resque/scheduler.rb
CHANGED
@@ -70,7 +70,7 @@ module Resque
|
|
70
70
|
def print_schedule
|
71
71
|
if rufus_scheduler
|
72
72
|
log! "Scheduling Info\tLast Run"
|
73
|
-
scheduler_jobs = rufus_scheduler.
|
73
|
+
scheduler_jobs = rufus_scheduler.jobs
|
74
74
|
scheduler_jobs.each do |_k, v|
|
75
75
|
log! "#{v.t}\t#{v.last}\t"
|
76
76
|
end
|
@@ -102,11 +102,14 @@ module Resque
|
|
102
102
|
if args.is_a?(::Array)
|
103
103
|
return args.first if args.size > 2 || !args.last.is_a?(::Hash)
|
104
104
|
# symbolize keys of hash for options
|
105
|
-
args[
|
105
|
+
args[2] = args[1].reduce({}) do |m, i|
|
106
106
|
key, value = i
|
107
107
|
m[(key.respond_to?(:to_sym) ? key.to_sym : key) || key] = value
|
108
108
|
m
|
109
109
|
end
|
110
|
+
|
111
|
+
args[2][:job] = true
|
112
|
+
args[1] = nil
|
110
113
|
end
|
111
114
|
args
|
112
115
|
end
|
@@ -128,6 +131,10 @@ module Resque
|
|
128
131
|
interval_types.each do |interval_type|
|
129
132
|
if !config[interval_type].nil? && config[interval_type].length > 0
|
130
133
|
args = optionizate_interval_value(config[interval_type])
|
134
|
+
if args.is_a?(::String)
|
135
|
+
args = [args, nil, job: true]
|
136
|
+
end
|
137
|
+
|
131
138
|
job = rufus_scheduler.send(interval_type, *args) do
|
132
139
|
if master?
|
133
140
|
log! "queueing #{config['class']} (#{name})"
|
@@ -268,7 +275,7 @@ module Resque
|
|
268
275
|
end
|
269
276
|
|
270
277
|
def rufus_scheduler
|
271
|
-
@rufus_scheduler ||= Rufus::Scheduler.
|
278
|
+
@rufus_scheduler ||= Rufus::Scheduler.new
|
272
279
|
end
|
273
280
|
|
274
281
|
# Stops old rufus scheduler and creates a new one. Returns the new
|
@@ -292,7 +299,8 @@ module Resque
|
|
292
299
|
loop do
|
293
300
|
schedule_name = Resque.redis.spop(:schedules_changed)
|
294
301
|
break unless schedule_name
|
295
|
-
|
302
|
+
Resque.reload_schedule!
|
303
|
+
if Resque.schedule.keys.include?(schedule_name)
|
296
304
|
unschedule_job(schedule_name)
|
297
305
|
load_schedule_job(schedule_name, Resque.schedule[schedule_name])
|
298
306
|
else
|
data/lib/resque/scheduler/cli.rb
CHANGED
@@ -256,18 +256,18 @@ module Resque
|
|
256
256
|
end
|
257
257
|
|
258
258
|
def clean_up_timestamp(key, timestamp)
|
259
|
-
# If the list is empty, remove it.
|
260
|
-
|
261
259
|
# Use a watch here to ensure nobody adds jobs to this delayed
|
262
260
|
# queue while we're removing it.
|
263
|
-
redis.watch
|
264
|
-
|
265
|
-
|
266
|
-
redis.
|
267
|
-
|
261
|
+
redis.watch(key) do
|
262
|
+
if redis.llen(key).to_i == 0
|
263
|
+
# If the list is empty, remove it.
|
264
|
+
redis.multi do
|
265
|
+
redis.del(key)
|
266
|
+
redis.zrem(:delayed_queue_schedule, timestamp.to_i)
|
267
|
+
end
|
268
|
+
else
|
269
|
+
redis.redis.unwatch
|
268
270
|
end
|
269
|
-
else
|
270
|
-
redis.unwatch
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
The list below contains all scheduled jobs. Click "Queue now" to queue
|
5
5
|
a job immediately.
|
6
6
|
Server local time: <%= Time.now %>
|
7
|
+
Current master: <%= Resque.redis.get(Resque::Scheduler.master_lock.key) %>
|
7
8
|
</p>
|
8
9
|
<div style="overflow-y: auto; width:100%; padding: 0px 5px;">
|
9
10
|
<table>
|
data/resque-scheduler.gemspec
CHANGED
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_runtime_dependency 'mono_logger', '~> 1.0'
|
40
40
|
spec.add_runtime_dependency 'redis', '~> 3.0'
|
41
41
|
spec.add_runtime_dependency 'resque', '~> 1.25'
|
42
|
-
spec.add_runtime_dependency 'rufus-scheduler', '~>
|
42
|
+
spec.add_runtime_dependency 'rufus-scheduler', '~> 3.0'
|
43
43
|
end
|
data/test/scheduler_args_test.rb
CHANGED
@@ -57,7 +57,7 @@ context 'scheduling jobs with arguments' do
|
|
57
57
|
|
58
58
|
test 'enqueue_from_config puts stuff in resque when env matches' do
|
59
59
|
Resque::Scheduler.env = 'production'
|
60
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
60
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
61
61
|
|
62
62
|
Resque.schedule = {
|
63
63
|
'some_ivar_job' => {
|
@@ -69,7 +69,7 @@ context 'scheduling jobs with arguments' do
|
|
69
69
|
}
|
70
70
|
|
71
71
|
Resque::Scheduler.load_schedule!
|
72
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
72
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
73
73
|
|
74
74
|
Resque.schedule = {
|
75
75
|
'some_ivar_job' => {
|
@@ -81,12 +81,12 @@ context 'scheduling jobs with arguments' do
|
|
81
81
|
}
|
82
82
|
|
83
83
|
Resque::Scheduler.load_schedule!
|
84
|
-
assert_equal(2, Resque::Scheduler.rufus_scheduler.
|
84
|
+
assert_equal(2, Resque::Scheduler.rufus_scheduler.jobs.size)
|
85
85
|
end
|
86
86
|
|
87
87
|
test 'enqueue_from_config does not enqueue when env does not match' do
|
88
88
|
Resque::Scheduler.env = nil
|
89
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
89
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
90
90
|
Resque.schedule = {
|
91
91
|
'some_ivar_job' => {
|
92
92
|
'cron' => '* * * * *',
|
@@ -97,7 +97,7 @@ context 'scheduling jobs with arguments' do
|
|
97
97
|
}
|
98
98
|
|
99
99
|
Resque::Scheduler.load_schedule!
|
100
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
100
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
101
101
|
|
102
102
|
Resque::Scheduler.env = 'production'
|
103
103
|
Resque.schedule = {
|
@@ -109,12 +109,12 @@ context 'scheduling jobs with arguments' do
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
Resque::Scheduler.load_schedule!
|
112
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
112
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
113
113
|
end
|
114
114
|
|
115
115
|
test 'enqueue_from_config when env env arg is not set' do
|
116
116
|
Resque::Scheduler.env = 'production'
|
117
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
117
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
118
118
|
|
119
119
|
Resque.schedule = {
|
120
120
|
'some_ivar_job' => {
|
@@ -124,7 +124,7 @@ context 'scheduling jobs with arguments' do
|
|
124
124
|
}
|
125
125
|
}
|
126
126
|
Resque::Scheduler.load_schedule!
|
127
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
127
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
128
128
|
end
|
129
129
|
|
130
130
|
test "calls the worker without arguments when 'args' is missing " \
|
data/test/scheduler_test.rb
CHANGED
@@ -56,7 +56,7 @@ context 'Resque::Scheduler' do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
test 'config makes it into the rufus_scheduler' do
|
59
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
59
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
60
60
|
|
61
61
|
Resque.schedule = {
|
62
62
|
some_ivar_job: {
|
@@ -67,7 +67,7 @@ context 'Resque::Scheduler' do
|
|
67
67
|
}
|
68
68
|
Resque::Scheduler.load_schedule!
|
69
69
|
|
70
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
70
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
71
71
|
assert Resque::Scheduler.scheduled_jobs.include?('some_ivar_job')
|
72
72
|
end
|
73
73
|
|
@@ -83,7 +83,7 @@ context 'Resque::Scheduler' do
|
|
83
83
|
|
84
84
|
Resque::Scheduler.load_schedule!
|
85
85
|
|
86
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
86
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
87
87
|
assert Resque::Scheduler.scheduled_jobs.include?('some_ivar_job')
|
88
88
|
|
89
89
|
Resque.redis.del(:schedules)
|
@@ -93,7 +93,7 @@ context 'Resque::Scheduler' do
|
|
93
93
|
|
94
94
|
Resque::Scheduler.reload_schedule!
|
95
95
|
|
96
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
96
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
97
97
|
|
98
98
|
assert_equal '/tmp/2', Resque.schedule['some_ivar_job2']['args']
|
99
99
|
assert Resque::Scheduler.scheduled_jobs.include?('some_ivar_job2')
|
@@ -107,7 +107,7 @@ context 'Resque::Scheduler' do
|
|
107
107
|
'args' => '/tmp'
|
108
108
|
)
|
109
109
|
|
110
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
110
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
111
111
|
assert_equal(1, Resque::Scheduler.scheduled_jobs.size)
|
112
112
|
assert Resque::Scheduler.scheduled_jobs.keys.include?('some_ivar_job')
|
113
113
|
end
|
@@ -120,11 +120,11 @@ context 'Resque::Scheduler' do
|
|
120
120
|
'args' => '/tmp'
|
121
121
|
)
|
122
122
|
|
123
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
123
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
124
124
|
assert_equal(1, Resque::Scheduler.scheduled_jobs.size)
|
125
125
|
assert Resque::Scheduler.scheduled_jobs.keys.include?('some_ivar_job')
|
126
126
|
job = Resque::Scheduler.scheduled_jobs['some_ivar_job']
|
127
|
-
assert job.
|
127
|
+
assert job.opts.keys.include?(:first_in)
|
128
128
|
end
|
129
129
|
|
130
130
|
test 'load_schedule_job with cron with options' do
|
@@ -135,11 +135,11 @@ context 'Resque::Scheduler' do
|
|
135
135
|
'args' => '/tmp'
|
136
136
|
)
|
137
137
|
|
138
|
-
assert_equal(1, Resque::Scheduler.rufus_scheduler.
|
138
|
+
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
|
139
139
|
assert_equal(1, Resque::Scheduler.scheduled_jobs.size)
|
140
140
|
assert Resque::Scheduler.scheduled_jobs.keys.include?('some_ivar_job')
|
141
141
|
job = Resque::Scheduler.scheduled_jobs['some_ivar_job']
|
142
|
-
assert job.
|
142
|
+
assert job.opts.keys.include?(:allow_overlapping)
|
143
143
|
end
|
144
144
|
|
145
145
|
test 'load_schedule_job without cron' do
|
@@ -149,7 +149,7 @@ context 'Resque::Scheduler' do
|
|
149
149
|
'args' => '/tmp'
|
150
150
|
)
|
151
151
|
|
152
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
152
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
153
153
|
assert_equal(0, Resque::Scheduler.scheduled_jobs.size)
|
154
154
|
assert !Resque::Scheduler.scheduled_jobs.keys.include?('some_ivar_job')
|
155
155
|
end
|
@@ -162,7 +162,7 @@ context 'Resque::Scheduler' do
|
|
162
162
|
'args' => '/tmp'
|
163
163
|
)
|
164
164
|
|
165
|
-
assert_equal(0, Resque::Scheduler.rufus_scheduler.
|
165
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
166
166
|
assert_equal(0, Resque::Scheduler.scheduled_jobs.size)
|
167
167
|
assert !Resque::Scheduler.scheduled_jobs.keys.include?('some_ivar_job')
|
168
168
|
end
|
@@ -199,7 +199,7 @@ context 'Resque::Scheduler' do
|
|
199
199
|
|
200
200
|
Resque::Scheduler.update_schedule
|
201
201
|
|
202
|
-
assert_equal(3, Resque::Scheduler.rufus_scheduler.
|
202
|
+
assert_equal(3, Resque::Scheduler.rufus_scheduler.jobs.size)
|
203
203
|
assert_equal(3, Resque::Scheduler.scheduled_jobs.size)
|
204
204
|
%w(some_ivar_job new_ivar_job stay_put_job).each do |job_name|
|
205
205
|
assert Resque::Scheduler.scheduled_jobs.keys.include?(job_name)
|
@@ -210,6 +210,26 @@ context 'Resque::Scheduler' do
|
|
210
210
|
assert_equal 0, Resque.redis.scard(:schedules_changed)
|
211
211
|
end
|
212
212
|
|
213
|
+
test 'update_schedule when all jobs have been removed' do
|
214
|
+
Resque::Scheduler.dynamic = true
|
215
|
+
Resque.schedule = {
|
216
|
+
'some_ivar_job' => {
|
217
|
+
'cron' => '* * * * *', 'class' => 'SomeIvarJob', 'args' => '/tmp'
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
Resque::Scheduler.load_schedule!
|
222
|
+
|
223
|
+
Resque.remove_schedule('some_ivar_job')
|
224
|
+
|
225
|
+
Resque::Scheduler.update_schedule
|
226
|
+
|
227
|
+
assert_equal(0, Resque::Scheduler.rufus_scheduler.jobs.size)
|
228
|
+
assert_equal(0, Resque::Scheduler.scheduled_jobs.size)
|
229
|
+
assert_equal([], Resque::Scheduler.scheduled_jobs.keys)
|
230
|
+
assert_equal 0, Resque.redis.scard(:schedules_changed)
|
231
|
+
end
|
232
|
+
|
213
233
|
test 'update_schedule with mocks' do
|
214
234
|
Resque::Scheduler.dynamic = true
|
215
235
|
Resque.schedule = {
|
@@ -271,7 +291,7 @@ context 'Resque::Scheduler' do
|
|
271
291
|
|
272
292
|
background_delayed_update.join
|
273
293
|
Resque::Scheduler.update_schedule
|
274
|
-
assert_equal(jobs_count, Resque::Scheduler.rufus_scheduler.
|
294
|
+
assert_equal(jobs_count, Resque::Scheduler.rufus_scheduler.jobs.size)
|
275
295
|
assert_equal(jobs_count, Resque::Scheduler.scheduled_jobs.size)
|
276
296
|
assert_equal 0, Resque.redis.scard(:schedules_changed)
|
277
297
|
end
|
@@ -435,7 +455,7 @@ context 'Resque::Scheduler' do
|
|
435
455
|
|
436
456
|
test 'prints schedule' do
|
437
457
|
fake_rufus_scheduler = mock
|
438
|
-
fake_rufus_scheduler.expects(:
|
458
|
+
fake_rufus_scheduler.expects(:jobs).at_least_once
|
439
459
|
.returns(foo: OpenStruct.new(t: nil, last: nil))
|
440
460
|
Resque::Scheduler.expects(:rufus_scheduler).at_least_once
|
441
461
|
.returns(fake_rufus_scheduler)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben VandenBos
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - ~>
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
201
|
+
version: '3.0'
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - ~>
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
208
|
+
version: '3.0'
|
209
209
|
description: ! " Light weight job scheduling on top of Resque.\n Adds methods
|
210
210
|
enqueue_at/enqueue_in to schedule jobs in the future.\n Also supports queueing
|
211
211
|
jobs on a fixed, cron-like schedule.\n"
|
@@ -231,7 +231,6 @@ files:
|
|
231
231
|
- HISTORY.md
|
232
232
|
- LICENSE
|
233
233
|
- README.md
|
234
|
-
- ROADMAP.md
|
235
234
|
- Rakefile
|
236
235
|
- Vagrantfile
|
237
236
|
- bin/resque-scheduler
|
data/ROADMAP.md
DELETED