comparison rhodecode/lib/celerylib/tasks.py @ 699:52da7cba88a6 beta

Code refactor for auth func, preparing for ldap support css updates. turned off graph,and branches for git changelog
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 16 Nov 2010 08:52:31 +0100
parents cb0d9ce6ac5c
children 02bdf2f296ff
comparison
equal deleted inserted replaced
698:4cd0709b6d4b 699:52da7cba88a6
63 @task 63 @task
64 @locked_task 64 @locked_task
65 def get_commits_stats(repo_name, ts_min_y, ts_max_y): 65 def get_commits_stats(repo_name, ts_min_y, ts_max_y):
66 from rhodecode.model.db import Statistics, Repository 66 from rhodecode.model.db import Statistics, Repository
67 log = get_commits_stats.get_logger() 67 log = get_commits_stats.get_logger()
68 author_key_cleaner = lambda k: person(k).replace('"', "") #for js data compatibilty 68
69 #for js data compatibilty
70 author_key_cleaner = lambda k: person(k).replace('"', "")
69 71
70 commits_by_day_author_aggregate = {} 72 commits_by_day_author_aggregate = {}
71 commits_by_day_aggregate = {} 73 commits_by_day_aggregate = {}
72 repos_path = get_repos_path() 74 repos_path = get_repos_path()
73 p = os.path.join(repos_path, repo_name) 75 p = os.path.join(repos_path, repo_name)
89 last_rev = cur_stats.stat_on_revision 91 last_rev = cur_stats.stat_on_revision
90 if not repo.revisions: 92 if not repo.revisions:
91 return True 93 return True
92 94
93 if last_rev == repo.revisions[-1] and len(repo.revisions) > 1: 95 if last_rev == repo.revisions[-1] and len(repo.revisions) > 1:
94 #pass silently without any work if we're not on first revision or current 96 #pass silently without any work if we're not on first revision or
95 #state of parsing revision(from db marker) is the last revision 97 #current state of parsing revision(from db marker) is the last revision
96 return True 98 return True
97 99
98 if cur_stats: 100 if cur_stats:
99 commits_by_day_aggregate = OrderedDict( 101 commits_by_day_aggregate = OrderedDict(
100 json.loads( 102 json.loads(