diff --git a/trap/plumber.py b/trap/plumber.py index da37a8f..8324853 100644 --- a/trap/plumber.py +++ b/trap/plumber.py @@ -35,6 +35,7 @@ class ExceptionHandlingProcess(Process): try: super(Process, self).run() except Exception as e: + logger.critical(f"Exception in {self.name}") logger.exception(e) self._kwargs['is_running'].clear() @@ -70,8 +71,13 @@ def start(): ExceptionHandlingProcess(target=run_ws_forwarder, kwargs={'config': args, 'is_running': isRunning}, name='forwarder'), ExceptionHandlingProcess(target=run_frame_emitter, kwargs={'config': args, 'is_running': isRunning}, name='frame_emitter'), ExceptionHandlingProcess(target=run_tracker, kwargs={'config': args, 'is_running': isRunning}, name='tracker'), - ExceptionHandlingProcess(target=run_renderer, kwargs={'config': args, 'is_running': isRunning}, name='renderer'), ] + + if args.render_preview: + procs.append( + ExceptionHandlingProcess(target=run_renderer, kwargs={'config': args, 'is_running': isRunning}, name='renderer') + ) + if not args.bypass_prediction: procs.append( ExceptionHandlingProcess(target=run_prediction_server, kwargs={'config': args, 'is_running':isRunning}, name='inference'),