# HG changeset patch # User Mads Kiilerich # Date 2016-09-06 00:51:18 # Node ID f770722cdb6cd2669d0e1f46f74b897e95477fc9 # Parent 9452b5a8e06f436db32e9a20adc76c9f85b39223 celery: drop wrong use of on_failure - if it should work, it should be a method somewhere, not a local function diff --git a/kallithea/lib/celerylib/tasks.py b/kallithea/lib/celerylib/tasks.py --- a/kallithea/lib/celerylib/tasks.py +++ b/kallithea/lib/celerylib/tasks.py @@ -235,7 +235,7 @@ def get_commits_stats(repo_name, ts_min_ log.debug('Breaking recursive mode due to reach of recurse limit') return True except LockHeld: - log.info('LockHeld') + log.info('Task with key %s already running', lockkey) return 'Task with key %s already running' % lockkey @@ -407,10 +407,6 @@ def create_repo(form_data, cur_user): RepoModel(DBS)._delete_filesystem_repo(repo) raise - # it's an odd fix to make celery fail task when exception occurs - def on_failure(self, *args, **kwargs): - pass - return True @@ -491,10 +487,6 @@ def create_repo_fork(form_data, cur_user RepoModel(DBS)._delete_filesystem_repo(repo) raise - # it's an odd fix to make celery fail task when exception occurs - def on_failure(self, *args, **kwargs): - pass - return True