resque-scheduler 1.8.2 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.9.1 (2010-06-04)
2
+
3
+ * Fixing issue with redis server 1.2.6 and redis gem 2.0.1
4
+
5
+ ## 1.9.0 (2010-06-04)
6
+
7
+ * Adding redis 2.0 support (bpo)
8
+
1
9
  ## 1.8.2 (2010-06-04)
2
10
 
3
11
  * Adding queue now functionality to delayed timestamps (daviddoan)
data/Rakefile CHANGED
@@ -36,6 +36,7 @@ begin
36
36
  gemspec.authors = ["Ben VandenBos"]
37
37
  gemspec.version = ResqueScheduler::Version
38
38
 
39
+ gemspec.add_dependency "redis", ">= 2.0.1"
39
40
  gemspec.add_dependency "resque", ">= 1.8.0"
40
41
  gemspec.add_dependency "rufus-scheduler"
41
42
  gemspec.add_development_dependency "jeweler"
@@ -90,7 +90,8 @@ module ResqueScheduler
90
90
  # Returns the next delayed queue timestamp
91
91
  # (don't call directly)
92
92
  def next_delayed_timestamp
93
- timestamp = redis.zrangebyscore(:delayed_queue_schedule, '-inf', Time.now.to_i, 'limit', 0, 1).first
93
+ items = redis.zrangebyscore :delayed_queue_schedule, '-inf', Time.now.to_i, :limit => [0, 1]
94
+ timestamp = items.nil? ? nil : items.first
94
95
  timestamp.to_i unless timestamp.nil?
95
96
  end
96
97
 
@@ -1,3 +1,3 @@
1
1
  module ResqueScheduler
2
- Version = '1.8.2'
2
+ Version = '1.9.1'
3
3
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{resque-scheduler}
8
- s.version = "1.8.2"
8
+ s.version = "1.9.1"
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"]
@@ -57,12 +57,14 @@ Gem::Specification.new do |s|
57
57
  s.specification_version = 3
58
58
 
59
59
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
60
+ s.add_runtime_dependency(%q<redis>, [">= 2.0.1"])
60
61
  s.add_runtime_dependency(%q<resque>, [">= 1.8.0"])
61
62
  s.add_runtime_dependency(%q<rufus-scheduler>, [">= 0"])
62
63
  s.add_development_dependency(%q<jeweler>, [">= 0"])
63
64
  s.add_development_dependency(%q<mocha>, [">= 0"])
64
65
  s.add_development_dependency(%q<rack-test>, [">= 0"])
65
66
  else
67
+ s.add_dependency(%q<redis>, [">= 2.0.1"])
66
68
  s.add_dependency(%q<resque>, [">= 1.8.0"])
67
69
  s.add_dependency(%q<rufus-scheduler>, [">= 0"])
68
70
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -70,6 +72,7 @@ Gem::Specification.new do |s|
70
72
  s.add_dependency(%q<rack-test>, [">= 0"])
71
73
  end
72
74
  else
75
+ s.add_dependency(%q<redis>, [">= 2.0.1"])
73
76
  s.add_dependency(%q<resque>, [">= 1.8.0"])
74
77
  s.add_dependency(%q<rufus-scheduler>, [">= 0"])
75
78
  s.add_dependency(%q<jeweler>, [">= 0"])
data/test/redis-test.conf CHANGED
@@ -113,20 +113,3 @@ databases 16
113
113
  # single TCP packet. Uses a bit more CPU but most of the times it is a win
114
114
  # in terms of number of queries per second. Use 'yes' if unsure.
115
115
  glueoutputbuf yes
116
-
117
- # Use object sharing. Can save a lot of memory if you have many common
118
- # string in your dataset, but performs lookups against the shared objects
119
- # pool so it uses more CPU and can be a bit slower. Usually it's a good
120
- # idea.
121
- #
122
- # When object sharing is enabled (shareobjects yes) you can use
123
- # shareobjectspoolsize to control the size of the pool used in order to try
124
- # object sharing. A bigger pool size will lead to better sharing capabilities.
125
- # In general you want this value to be at least the double of the number of
126
- # very common strings you have in your dataset.
127
- #
128
- # WARNING: object sharing is experimental, don't enable this feature
129
- # in production before of Redis 1.0-stable. Still please try this feature in
130
- # your development environment so that we can test it better.
131
- shareobjects no
132
- shareobjectspoolsize 1024
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: 1.8.2
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben VandenBos
@@ -12,6 +12,16 @@ cert_chain: []
12
12
  date: 2010-06-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: redis
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.1
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: resque
17
27
  type: :runtime