Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #10 from iuridiniz/didip

Adds support to 'db' param in order to select redis database
  • Loading branch information...
commit 656905c435eb475c23aeaf869714629bd34408ed 2 parents 48d2999 + b4b2c3a
@didip authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  beaker_extensions/
3  beaker_extensions/
@@ -14,10 +14,11 @@
class RedisManager(NoSqlManager):
def __init__(self, namespace, url=None, data_dir=None, lock_dir=None, **params):
+ self.db = params.pop('db', None)
NoSqlManager.__init__(self, namespace, url=url, data_dir=data_dir, lock_dir=lock_dir, **params)
def open_connection(self, host, port, **params):
- self.db_conn = Redis(host=host, port=int(port), **params)
+ self.db_conn = Redis(host=host, port=int(port), db=self.db, **params)
def __contains__(self, key):
return self.db_conn.exists(self._format_key(key))

0 comments on commit 656905c

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