Show More
@@ -107,7 +107,9 b' class HooksCeleryClient:' | |||
|
107 | 107 | inquired_task = self.celery_app.signature( |
|
108 | 108 | f'rhodecode.lib.celerylib.tasks.{method}' |
|
109 | 109 | ) |
|
110 |
re |
|
|
110 | result = inquired_task.delay(extras).get(timeout=self.TASK_TIMEOUT) | |
|
111 | ||
|
112 | return result | |
|
111 | 113 | |
|
112 | 114 | |
|
113 | 115 | class HooksShadowRepoClient: |
@@ -157,9 +159,11 b' class SvnMessageWriter(RemoteMessageWrit' | |||
|
157 | 159 | self.stderr.write(message) |
|
158 | 160 | |
|
159 | 161 | |
|
160 | def _handle_exception(result): | |
|
162 | def _maybe_handle_exception(result): | |
|
161 | 163 | exception_class = result.get('exception') |
|
162 | 164 | exception_traceback = result.get('exception_traceback') |
|
165 | if not (exception_class and exception_traceback): | |
|
166 | return | |
|
163 | 167 | log.debug('Handling hook-call exception: %s', exception_class) |
|
164 | 168 | |
|
165 | 169 | if exception_traceback: |
@@ -200,7 +204,7 b' def _call_hook(hook_name, extras, writer' | |||
|
200 | 204 | log.debug('Hooks, using client:%s', hooks_client) |
|
201 | 205 | result = hooks_client(hook_name, extras) |
|
202 | 206 | log.debug('Hooks got result: %s', result) |
|
203 | _handle_exception(result) | |
|
207 | _maybe_handle_exception(result) | |
|
204 | 208 | writer.write(result['output']) |
|
205 | 209 | |
|
206 | 210 | return result['status'] |
General Comments 0
You need to be logged in to leave comments.
Login now