Mercurial > public > src > rhodecode
diff pylons_app/lib/celerylib/__init__.py @ 557:9bedaa073c23
fixed lockdecrator to return executed function data
removed print
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 28 Sep 2010 20:07:55 +0000 |
parents | d5efb83590ef |
children |
line wrap: on
line diff
--- a/pylons_app/lib/celerylib/__init__.py Tue Sep 28 19:53:52 2010 +0000 +++ b/pylons_app/lib/celerylib/__init__.py Tue Sep 28 20:07:55 2010 +0000 @@ -42,8 +42,9 @@ log.info('running task with lockkey %s', lockkey) try: l = DaemonLock(lockkey) - func(*fargs, **fkwargs) + ret = func(*fargs, **fkwargs) l.release() + return ret except LockHeld: log.info('LockHeld') return 'Task with key %s already running' % lockkey