Mercurial > kallithea
changeset 6166:e67b9f4b9d95
celery: drop pointless get_logger
It didn't give meaningful names anyway ... and using the tasks module name is
fine.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 06 Sep 2016 00:51:18 +0200 |
parents | 8dcf73cc9098 |
children | 9452b5a8e06f |
files | kallithea/lib/celerylib/tasks.py |
diffstat | 1 files changed, 1 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/celerylib/tasks.py Tue Sep 06 00:51:18 2016 +0200 +++ b/kallithea/lib/celerylib/tasks.py Tue Sep 06 00:51:18 2016 +0200 @@ -57,13 +57,7 @@ __all__ = ['whoosh_index', 'get_commits_stats', 'send_email'] -def get_logger(cls): - if CELERY_ON: - try: - return cls.get_logger() - except AttributeError: - pass - return logging.getLogger(__name__) +log = logging.getLogger(__name__) @task(ignore_result=True) @@ -82,7 +76,6 @@ @task(ignore_result=True) @dbsession def get_commits_stats(repo_name, ts_min_y, ts_max_y, recurse_limit=100): - log = get_logger(get_commits_stats) DBS = get_session() lockkey = __get_lockkey('get_commits_stats', repo_name, ts_min_y, ts_max_y) @@ -260,7 +253,6 @@ :param headers: dictionary of prepopulated e-mail headers :param author: User object of the author of this mail, if known and relevant """ - log = get_logger(send_email) assert isinstance(recipients, list), recipients if headers is None: headers = {} @@ -341,7 +333,6 @@ from kallithea.model.user import UserModel from kallithea.model.db import Setting - log = get_logger(create_repo) DBS = get_session() cur_user = UserModel(DBS)._get_user(cur_user) @@ -435,7 +426,6 @@ from kallithea.model.repo import RepoModel from kallithea.model.user import UserModel - log = get_logger(create_repo_fork) DBS = get_session() base_path = Repository.base_path()