Commit 59570fdc authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed missing log messages regarding released locks.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 7c200e32
......@@ -2,6 +2,12 @@
History
=======
0.18.12 (coming soon)
---------------------
* Fixed missing log messages regarding released locks.
0.18.11 (2020-11-03)
--------------------
......
......@@ -96,8 +96,9 @@ class MultiSlotLock(Semaphore):
self.client.delete(self.grabbed_key)
def __exit__(self, exc_type, exc_val, exc_tb):
exitcode = super(MultiSlotLock, self).__exit__(exc_type, exc_val, exc_tb)
self.logger.close()
return super(MultiSlotLock, self).__exit__(exc_type, exc_val, exc_tb)
return exitcode
class SharedResourceLock(MultiSlotLock):
......@@ -134,7 +135,6 @@ class SharedResourceLock(MultiSlotLock):
self.client.delete(self.grabbed_key_jobID)
def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(SharedResourceLock, self).__exit__(exc_type, exc_val, exc_tb)
......@@ -146,7 +146,6 @@ class IOLock(SharedResourceLock):
super(IOLock, self).__init__(name='IOLock', allowed_slots=allowed_slots, logger=logger, **kwargs)
def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(IOLock, self).__exit__(exc_type, exc_val, exc_tb)
......@@ -158,7 +157,6 @@ class ProcessLock(SharedResourceLock):
super(ProcessLock, self).__init__(name='ProcessLock', allowed_slots=allowed_slots, logger=logger, **kwargs)
def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(ProcessLock, self).__exit__(exc_type, exc_val, exc_tb)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment