Skip to content

Commit

Permalink
Add DataMapper::Adapters::CassandraAdapter#reset
Browse files Browse the repository at this point in the history
* This method will disconnect all clients and then reinitialize the
  connection pool.
  • Loading branch information
dkubb committed Jun 21, 2013
1 parent 72f1ca6 commit 77d423f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/dm-cassandra-adapter/adapter.rb
Expand Up @@ -49,6 +49,12 @@ def execute(*args)
nil
end

def reset
@pool.shutdown(&:disconnect!)
@pool = new_pool
self
end

private

def setup_keyspace
Expand Down

0 comments on commit 77d423f

Please sign in to comment.