##// END OF EJS Templates
TurboGears: drop workaround for < 2.4...
Mads Kiilerich -
r8599:1b683a4e default
parent child Browse files
Show More
@@ -101,11 +101,9 b' def __get_lockkey(func, *fargs, **fkwarg'
101 101 def locked_task(func):
102 102 def __wrapper(func, *fargs, **fkwargs):
103 103 lockkey = __get_lockkey(func, *fargs, **fkwargs)
104 lockkey_path = config.get('cache_dir') or config['app_conf']['cache_dir'] # Backward compatibility for TurboGears < 2.4
105
106 104 log.info('running task with lockkey %s', lockkey)
107 105 try:
108 l = DaemonLock(os.path.join(lockkey_path, lockkey))
106 l = DaemonLock(os.path.join(config['cache_dir'], lockkey))
109 107 ret = func(*fargs, **fkwargs)
110 108 l.release()
111 109 return ret
@@ -84,12 +84,9 b' def get_commits_stats(repo_name, ts_min_'
84 84 DBS = celerylib.get_session()
85 85 lockkey = celerylib.__get_lockkey('get_commits_stats', repo_name, ts_min_y,
86 86 ts_max_y)
87 lockkey_path = config.get('cache_dir') or config['app_conf']['cache_dir'] # Backward compatibility for TurboGears < 2.4
88
89 87 log.info('running task with lockkey %s', lockkey)
90
91 88 try:
92 lock = celerylib.DaemonLock(os.path.join(lockkey_path, lockkey))
89 lock = celerylib.DaemonLock(os.path.join(config['cache_dir'], lockkey))
93 90
94 91 co_day_auth_aggr = {}
95 92 commits_by_day_aggregate = {}
General Comments 0
You need to be logged in to leave comments. Login now