##// END OF EJS Templates
auth: update logging for permission calculation function
marcink -
r2813:fc1dc788 default
parent child Browse files
Show More
@@ -23,6 +23,7 b' authentication and permission libraries'
23 23 """
24 24
25 25 import os
26 import time
26 27 import inspect
27 28 import collections
28 29 import fnmatch
@@ -1074,9 +1075,9 b' class AuthUser(object):'
1074 1075 rhodecode.CONFIG.get('beaker.cache.short_term.expire'))
1075 1076 cache_on = cache or cache_seconds > 0
1076 1077 log.debug(
1077 'Computing PERMISSION tree for scope `%s` with caching: %s' % (
1078 scope, cache_on))
1079
1078 'Computing PERMISSION tree for user %s scope `%s` '
1079 'with caching: %s[%ss]' % (user, scope, cache_on, cache_seconds))
1080 start = time.time()
1080 1081 compute = caches.conditional_cache(
1081 1082 'short_term', 'cache_desc',
1082 1083 condition=cache_on, func=_cached_perms_data)
@@ -1087,8 +1088,9 b' class AuthUser(object):'
1087 1088 result_repr = []
1088 1089 for k in result:
1089 1090 result_repr.append((k, len(result[k])))
1090
1091 log.debug('PERMISSION tree computed %s' % (result_repr,))
1091 total = time.time() - start
1092 log.debug('PERMISSION tree for user %s computed in %.3fs: %s' % (
1093 user, total, result_repr))
1092 1094 return result
1093 1095
1094 1096 @property
General Comments 0
You need to be logged in to leave comments. Login now