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

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 @@ ...@@ -2,6 +2,12 @@
History History
======= =======
0.18.12 (coming soon)
---------------------
* Fixed missing log messages regarding released locks.
0.18.11 (2020-11-03) 0.18.11 (2020-11-03)
-------------------- --------------------
......
...@@ -96,8 +96,9 @@ class MultiSlotLock(Semaphore): ...@@ -96,8 +96,9 @@ class MultiSlotLock(Semaphore):
self.client.delete(self.grabbed_key) self.client.delete(self.grabbed_key)
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
exitcode = super(MultiSlotLock, self).__exit__(exc_type, exc_val, exc_tb)
self.logger.close() self.logger.close()
return super(MultiSlotLock, self).__exit__(exc_type, exc_val, exc_tb) return exitcode
class SharedResourceLock(MultiSlotLock): class SharedResourceLock(MultiSlotLock):
...@@ -134,7 +135,6 @@ class SharedResourceLock(MultiSlotLock): ...@@ -134,7 +135,6 @@ class SharedResourceLock(MultiSlotLock):
self.client.delete(self.grabbed_key_jobID) self.client.delete(self.grabbed_key_jobID)
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(SharedResourceLock, self).__exit__(exc_type, exc_val, exc_tb) return super(SharedResourceLock, self).__exit__(exc_type, exc_val, exc_tb)
...@@ -146,7 +146,6 @@ class IOLock(SharedResourceLock): ...@@ -146,7 +146,6 @@ class IOLock(SharedResourceLock):
super(IOLock, self).__init__(name='IOLock', allowed_slots=allowed_slots, logger=logger, **kwargs) super(IOLock, self).__init__(name='IOLock', allowed_slots=allowed_slots, logger=logger, **kwargs)
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(IOLock, self).__exit__(exc_type, exc_val, exc_tb) return super(IOLock, self).__exit__(exc_type, exc_val, exc_tb)
...@@ -158,7 +157,6 @@ class ProcessLock(SharedResourceLock): ...@@ -158,7 +157,6 @@ class ProcessLock(SharedResourceLock):
super(ProcessLock, self).__init__(name='ProcessLock', allowed_slots=allowed_slots, logger=logger, **kwargs) super(ProcessLock, self).__init__(name='ProcessLock', allowed_slots=allowed_slots, logger=logger, **kwargs)
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
self.logger.close()
return super(ProcessLock, self).__exit__(exc_type, exc_val, exc_tb) 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