def __init__(self, store='simple://', cache='simple://', **kw): super(Shove, self).__init__() # load store backend self._store = store_backend(store, **kw) # load cache backend self._cache = cache_backend(cache, **kw) # buffer for lazier writing self._buffer = dict() # setting for syncing frequency self._sync = kw.get('sync', 2)
def __init__(self, *stores, **kw): # init superclass with first store super(MultiShove, self).__init__() if not stores: stores = ('simple://', ) # load stores self._stores = list(store_backend(i, **kw) for i in stores) # load cache self._cache = cache_backend(kw.get('cache', 'simple://'), **kw) # buffer for lazy writing self._buffer = dict() # setting for syncing frequency self._sync = kw.get('sync', 2)
def __init__(self, *stores, **kw): # init superclass with first store super(MultiShove, self).__init__() if not stores: stores = ("simple://",) # load stores self._stores = list(store_backend(i, **kw) for i in stores) # load cache self._cache = cache_backend(kw.get("cache", "simple://"), **kw) # buffer for lazy writing self._buffer = dict() # setting for syncing frequency self._sync = kw.get("sync", 2)
def __init__(self, *stores, **kw): # init superclass with first store super(MultiShove, self).__init__() if not stores: stores = ('simple://',) # load stores self._stores = list(store_backend(i, **kw) for i in stores) # load cache self._cache = cache_backend(kw.get('cache', 'simple://'), **kw) # buffer for lazy writing self._buffer = dict() # setting for syncing frequency self._sync = kw.get('sync', 2) # dispatcher self._dispatcher = kw.get('dispatcher', copy_dispatcher)(self._stores)