Add debug logging to the lock manager.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-01 02:31:17 -04:00
parent 916c3497c4
commit c42a2c8a94
3 changed files with 27 additions and 3 deletions
+9 -2
View File
@@ -1,5 +1,9 @@
from __future__ import unicode_literals
import logging
logger = logging.getLogger(__name__)
class LockingBackend(object):
"""
@@ -8,8 +12,11 @@ class LockingBackend(object):
"""
@classmethod
def acquire_lock(cls, name, timeout=None):
raise NotImplementedError
logger.debug('acquiring lock: %s, timeout: %s', name, timeout)
@classmethod
def purge_locks(cls):
raise NotImplementedError
logger.debug('purging locks')
def release(self):
logger.debug('releasing lock: %s', self.name)