Add closers for persistent store backend
This commit is contained in:
parent
14f4cb23ae
commit
d133832e73
@ -154,3 +154,7 @@ class SimpleFileStoreFactory:
|
|||||||
if re.match(re_processedname, v):
|
if re.match(re_processedname, v):
|
||||||
r.append(v)
|
r.append(v)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
pass
|
||||||
|
@ -96,3 +96,7 @@ class RedisStoreFactory:
|
|||||||
def add(self, k):
|
def add(self, k):
|
||||||
k = str(k)
|
k = str(k)
|
||||||
return RedisStore(k, self.redis, binary=self.__binary)
|
return RedisStore(k, self.redis, binary=self.__binary)
|
||||||
|
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.redis.close()
|
||||||
|
@ -119,3 +119,8 @@ class RocksDbStoreFactory:
|
|||||||
def add(self, k):
|
def add(self, k):
|
||||||
k = str(k)
|
k = str(k)
|
||||||
return RocksDbStore(k, self.db, binary=self.__binary)
|
return RocksDbStore(k, self.db, binary=self.__binary)
|
||||||
|
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.db.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user