X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/35d423819725e92020504be4a647fe7d9f152dbb..45f442f7c3813e8525b33bbbcc0ead062468fd28:/snf-pithos-app/pithos/api/util.py diff --git a/snf-pithos-app/pithos/api/util.py b/snf-pithos-app/pithos/api/util.py index fc10f42..f8233f9 100644 --- a/snf-pithos-app/pithos/api/util.py +++ b/snf-pithos-app/pithos/api/util.py @@ -822,6 +822,9 @@ class PithosBackendPool(ObjectPool): backend._use_count = USAGE_LIMIT return backend + def _pool_verify(self, backend): + return 1 + def _pool_cleanup(self, backend): c = backend._use_count - 1 if c < 0: @@ -829,6 +832,10 @@ class PithosBackendPool(ObjectPool): return True backend._use_count = c + if backend.trans is not None: + backend.wrapper.rollback() + if backend.messages: + backend.messages = [] return False _pithos_backend_pool = PithosBackendPool(size=POOL_SIZE)