Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add Risky.riak!

  • Loading branch information...
commit 670e3f915e3c7faa639880e1952821e1f5640013 1 parent 6a253fb
Kyle Kingsbury authored

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. +8 0 lib/risky.rb
8 lib/risky.rb
@@ -254,6 +254,14 @@ def self.riak
254 254 end
255 255 end
256 256
  257 + # Forces this model and thread's Riak client to be reset.
  258 + # If your @riak proc can choose between multiple hosts, calling this on
  259 + # failure will allow subsequent requests to proceed on another host.
  260 + def self.riak!
  261 + Thread.current["self.riak"] = nil
  262 + riak
  263 + end
  264 +
257 265 # Sets the Riak Client backing this model class. If client is a lambda (or
258 266 # anything responding to #call), it will be invoked to generate a new client
259 267 # every time Risky feels it is appropriate. Clients are stored in

0 comments on commit 670e3f9

Please sign in to comment.
Something went wrong with that request. Please try again.