Skip to content

Instantly share code, notes, and snippets.

@stavxyz
Created December 30, 2013 16:28
Show Gist options
  • Save stavxyz/8184301 to your computer and use it in GitHub Desktop.
Save stavxyz/8184301 to your computer and use it in GitHub Desktop.
redis string from connection_string
import urlparse
from redis import Redis
from waldo.common import config
conf = config.current()
dbstring = conf['connection_string']
dbstring = urlparse.urlparse(dbstring)
dbstring = "redis://" + dbstring.netloc + ":6329"
redisclient = Redis.from_url(dbstring, db=3)
redisclient.config_set('appendonly', 'yes')
redisclient = redisclient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment