brianjlandau-resque-scheduler 1.10.7 → 1.10.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{brianjlandau-resque-scheduler}
8
- s.version = "1.10.7"
8
+ s.version = "1.10.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben VandenBos", "Brian Landau"]
@@ -169,7 +169,7 @@ module Resque
169
169
 
170
170
  def update_schedule
171
171
  schedule_from_redis = Resque.get_schedules
172
- if !schedule_from_redis.nil? && !schedule_from_redis.empty? && schedule_from_redis != Resque.schedule
172
+ if !schedule_from_redis.nil? && schedule_from_redis != Resque.schedule
173
173
  log "Updating schedule..."
174
174
  # unload schedules that no longer exist
175
175
  (Resque.schedule.keys - schedule_from_redis.keys).each do |name|
@@ -41,10 +41,14 @@ module ResqueScheduler
41
41
 
42
42
  # gets the schedule as it exists in redis
43
43
  def get_schedules
44
- redis.hgetall(:schedules).tap do |h|
45
- h.each do |name, config|
46
- h[name] = decode(config)
44
+ if redis.exists(:schedules)
45
+ redis.hgetall(:schedules).tap do |h|
46
+ h.each do |name, config|
47
+ h[name] = decode(config)
48
+ end
47
49
  end
50
+ else
51
+ nil
48
52
  end
49
53
  end
50
54
 
@@ -1,3 +1,3 @@
1
1
  module ResqueScheduler
2
- Version = '1.10.7'
2
+ Version = '1.10.8'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brianjlandau-resque-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 47
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 10
9
- - 7
10
- version: 1.10.7
9
+ - 8
10
+ version: 1.10.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben VandenBos