Log the use of utils.synchronized.

This commit is contained in:
Josh Kearney 2011-03-16 20:36:22 +00:00 committed by Tarmac
commit 699abfe9e6

View File

@ -530,6 +530,9 @@ def synchronized(name):
def wrap(f):
@functools.wraps(f)
def inner(*args, **kwargs):
LOG.debug(_("Attempting to grab %(lock)s for method "
"%(method)s..." % {"lock": name,
"method": f.__name__}))
lock = lockfile.FileLock(os.path.join(FLAGS.lock_path,
'nova-%s.lock' % name))
with lock: