@@ 62-74 (lines=13) @@ | ||
59 | if self.config is not None: |
|
60 | self.load_common_conf() |
|
61 | ||
62 | def _log_result_decorator(fct): |
|
63 | """Log (DEBUG) the result of the function fct.""" |
|
64 | ||
65 | def wrapper(*args, **kw): |
|
66 | counter = Counter() |
|
67 | ret = fct(*args, **kw) |
|
68 | duration = counter.get() |
|
69 | class_name = args[0].__class__.__name__ |
|
70 | class_module = args[0].__class__.__module__ |
|
71 | logger.debug(f"{class_name} {class_module} {fct.__name__} return {ret} in {duration} seconds") |
|
72 | return ret |
|
73 | ||
74 | return wrapper |
|
75 | ||
76 | def exit(self): |
|
77 | """Close the export module.""" |
@@ 1179-1191 (lines=13) @@ | ||
1176 | ||
1177 | return wrapper |
|
1178 | ||
1179 | def _log_result_decorator(fct): |
|
1180 | """Log (DEBUG) the result of the function fct.""" |
|
1181 | ||
1182 | def wrapper(*args, **kw): |
|
1183 | counter = Counter() |
|
1184 | ret = fct(*args, **kw) |
|
1185 | duration = counter.get() |
|
1186 | class_name = args[0].__class__.__name__ |
|
1187 | class_module = args[0].__class__.__module__ |
|
1188 | logger.debug(f"{class_name} {class_module} {fct.__name__} return {ret} in {duration} seconds") |
|
1189 | return ret |
|
1190 | ||
1191 | return wrapper |
|
1192 | ||
1193 | def _manage_rate(fct): |
|
1194 | """Manage rate decorator for update method.""" |