diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-29 08:30:52 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-29 08:30:52 +0000 |
commit | 683d2682621c23bd2fe5c649bf505fe2f9ccf216 (patch) | |
tree | 4701f0d155b6c9a129826a64166b8c1b8a38fa86 | |
parent | 6d3efba6ed8f417b4b724c27ba3783aa64b99f78 (diff) | |
parent | 9b3c8f34a92e62ce5ba13a10dd9e02f3a3105188 (diff) | |
download | oslo-concurrency-683d2682621c23bd2fe5c649bf505fe2f9ccf216.tar.gz |
Merge "Add debug log to indicate when external lock is taken"
-rw-r--r-- | oslo_concurrency/lockutils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/oslo_concurrency/lockutils.py b/oslo_concurrency/lockutils.py index becda88..e896a1a 100644 --- a/oslo_concurrency/lockutils.py +++ b/oslo_concurrency/lockutils.py @@ -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: |