Example #1
0
 def backend(cls, namespace):
     if namespace:
         backend = cls.cfg.backend_server or 'redis://127.0.0.1:6379'
         scheme, address, params = parse_connection_string(backend)
         params['namespace'] = namespace
         return get_connection_string(scheme, address, params)
     else:
         return cls.cfg.backend_server
Example #2
0
 def backend(cls, namespace):
     if namespace:
         backend = cls.cfg.backend_server or 'redis://127.0.0.1:6379'
         scheme, address, params = parse_connection_string(backend)
         params['namespace'] = namespace
         return get_connection_string(scheme, address, params)
     else:
         return cls.cfg.backend_server
Example #3
0
 def get_connection_string(cls, scheme, address, params, name):
     """Create the connection string used during initialisation
     of a new :attr:`Backend`."""
     if name:
         params["name"] = name
     return get_connection_string(scheme, address, params)
Example #4
0
 def get_connection_string(cls, scheme, address, params, name):
     '''Create the connection string used during initialisation
     of a new :attr:`Backend`.'''
     if name:
         params['name'] = name
     return get_connection_string(scheme, address, params)
Example #5
0
 def get_connection_string(cls, scheme, address, params, name):
     if name:
         params['namespace'] = '%s.' % name
     return get_connection_string(scheme, address, params)
Example #6
0
 def get_connection_string(cls, scheme, address, params, name):
     '''The ``name`` is used to set the ``namespace`` parameters in the
     connection string.'''
     if name:
         params['namespace'] = '%s.' % name
     return get_connection_string(scheme, address, params)
Example #7
0
 def get_connection_string(cls, scheme, address, params, name):
     '''The ``name`` is used to set the ``namespace`` parameters in the
     connection string.'''
     if name:
         params['namespace'] = '%s.' % name
     return get_connection_string(scheme, address, params)