about summary refs log tree commit homepage
path: root/lib/mogilefs/client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-14 17:37:23 -0800
committerEric Wong <normalperson@yhbt.net>2011-12-14 17:44:23 -0800
commitc1cf4444b2ca9126e8450ae3224cd406f0e43624 (patch)
treedcfda617ac8db129eb3bc1e979d1412f470d61af /lib/mogilefs/client.rb
parent0b933fc83b8b519c8e587caa6606dd372dda18af (diff)
downloadmogilefs-client-c1cf4444b2ca9126e8450ae3224cd406f0e43624.tar.gz
This controls the retry timeout of a failed backend
Diffstat (limited to 'lib/mogilefs/client.rb')
-rw-r--r--lib/mogilefs/client.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mogilefs/client.rb b/lib/mogilefs/client.rb
index 696f31f..7a808f1 100644
--- a/lib/mogilefs/client.rb
+++ b/lib/mogilefs/client.rb
@@ -26,6 +26,7 @@ class MogileFS::Client
     @hosts = args[:hosts]
     @readonly = args[:readonly] ? true : false
     @timeout = args[:timeout]
+    @fail_timeout = args[:fail_timeout]
 
     reload
   end
@@ -34,7 +35,9 @@ class MogileFS::Client
   # Creates a new MogileFS::Backend.
 
   def reload
-    @backend = MogileFS::Backend.new :hosts => @hosts, :timeout => @timeout
+    @backend = MogileFS::Backend.new(:hosts => @hosts,
+                                     :timeout => @timeout,
+                                     :fail_timeout => @fail_timeout)
   end
 
   ##