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