kestrel-client 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kestrel-client}
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Freels", "Rael Dornfest"]
12
- s.date = %q{2011-03-09}
12
+ s.date = %q{2011-03-10}
13
13
  s.description = %q{Ruby client for the Kestrel queue server}
14
14
  s.email = %q{rael@twitter.com}
15
15
  s.extra_rdoc_files = [
@@ -162,8 +162,7 @@ module Kestrel
162
162
  @counter >= @gets_per_server
163
163
  @counter = 0
164
164
  @current_queue = key
165
- @read_client.quit
166
- @read_client.set_servers(servers[rand(@server_count)])
165
+ @read_client.reset(servers[rand(@server_count)])
167
166
  else
168
167
  @counter +=1
169
168
  end
@@ -186,11 +185,11 @@ module Kestrel
186
185
  rescue *RECOVERABLE_ERRORS
187
186
  tries ||= @exception_retry_limit + 1
188
187
  tries -= 1
188
+ @write_client.reset(servers[rand(@server_count)])
189
+
189
190
  if tries > 0
190
191
  retry
191
192
  else
192
- @write_client.quit
193
- @write_client.set_servers(servers[rand(@server_count)])
194
193
  raise
195
194
  end
196
195
  end
@@ -20,8 +20,7 @@ describe Kestrel::Client do
20
20
  it "gets from the same server :gets_per_server times" do
21
21
  client = @kestrel.instance_variable_get(:@read_client)
22
22
  mock(client).get("a_queue/t=10", true).times(102).returns('item')
23
- mock(client).quit.once
24
- mock(client).set_servers.with(anything).once
23
+ mock(client).reset.with(anything).once
25
24
 
26
25
  102.times { @kestrel.get("a_queue") }
27
26
  end
@@ -29,8 +28,7 @@ describe Kestrel::Client do
29
28
  it "gets from a different server when the last result was nil" do
30
29
  client = @kestrel.instance_variable_get(:@read_client)
31
30
  mock(client).get("a_queue/t=10", true).returns(nil).twice
32
- mock(client).quit.once
33
- mock(client).set_servers.with(anything).once
31
+ mock(client).reset.with(anything).once
34
32
 
35
33
  2.times { @kestrel.get("a_queue") }
36
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kestrel-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Freels
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-09 00:00:00 -08:00
19
+ date: 2011-03-10 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency