Merge "Add debug log to indicate when external lock is taken"

This commit is contained in:
Jenkins 2017-07-29 08:30:52 +00:00 committed by Gerrit Code Review
commit 683d268262

View File

@ -214,6 +214,9 @@ def lock(name, lock_file_prefix=None, external=False, lock_path=None,
if external and not CONF.oslo_concurrency.disable_process_locking:
ext_lock = external_lock(name, lock_file_prefix, lock_path)
ext_lock.acquire(delay=delay)
if do_log:
LOG.debug('Acquired external semaphore "%(lock)s"',
{'lock': name})
try:
yield ext_lock
finally: