Permalink
Browse files

Redis-2.0.1 compatibility fix.

Resolves issue 18 - now requires v2.0 of the Redis library.
  • Loading branch information...
bpo authored and bvandenbos committed Jun 4, 2010
1 parent ee0cee2 commit 756822a9a0f47043ecde650f449e9ba47d530d62
Showing with 2 additions and 1 deletion.
  1. +1 −0 Rakefile
  2. +1 −1 lib/resque_scheduler.rb
View
@@ -36,6 +36,7 @@ begin
gemspec.authors = ["Ben VandenBos"]
gemspec.version = ResqueScheduler::Version
+ gemspec.add_dependency "redis", ">= 2.0.1"
gemspec.add_dependency "resque", ">= 1.8.0"
gemspec.add_dependency "rufus-scheduler"
gemspec.add_development_dependency "jeweler"
View
@@ -90,7 +90,7 @@ def delayed_timestamp_peek(timestamp, start, count)
# Returns the next delayed queue timestamp
# (don't call directly)
def next_delayed_timestamp
- timestamp = redis.zrangebyscore(:delayed_queue_schedule, '-inf', Time.now.to_i, 'limit', 0, 1).first
+ timestamp = redis.zrangebyscore(:delayed_queue_schedule, '-inf', Time.now.to_i, :limit => [0, 1]).first
timestamp.to_i unless timestamp.nil?
end

0 comments on commit 756822a

Please sign in to comment.