diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2010-09-28 20:07:55 +0000 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2010-09-28 20:07:55 +0000 |
commit | 63df7e463ba5dba105304325223cd11e1c71842e (patch) | |
tree | 6d60707d905ecae3443f8796ac6c74bc3d4086a3 | |
parent | 784ad1e2ca29828099e730ef4a8657fd30974e6d (diff) |
fixed lockdecrator to return executed function data
removed print
-rw-r--r-- | pylons_app/controllers/summary.py | 1 | ||||
-rw-r--r-- | pylons_app/lib/celerylib/__init__.py | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pylons_app/controllers/summary.py b/pylons_app/controllers/summary.py index 49132d7e..f1280187 100644 --- a/pylons_app/controllers/summary.py +++ b/pylons_app/controllers/summary.py @@ -95,7 +95,6 @@ class SummaryController(BaseController): key=lambda k: k[1])[:2] ) ) - print c.trending_languages else: c.commit_data = json.dumps({}) c.overview_data = json.dumps([[ts_min_y, 0], [ts_max_y, 0] ]) diff --git a/pylons_app/lib/celerylib/__init__.py b/pylons_app/lib/celerylib/__init__.py index 68cb8ef8..25b40b07 100644 --- a/pylons_app/lib/celerylib/__init__.py +++ b/pylons_app/lib/celerylib/__init__.py @@ -42,8 +42,9 @@ def locked_task(func): 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 |