allow disabling render preview

This commit is contained in:
Ruben van de Ven 2023-10-20 13:25:10 +02:00
parent c903d07b49
commit 0a02422733

View file

@ -35,6 +35,7 @@ class ExceptionHandlingProcess(Process):
try: try:
super(Process, self).run() super(Process, self).run()
except Exception as e: except Exception as e:
logger.critical(f"Exception in {self.name}")
logger.exception(e) logger.exception(e)
self._kwargs['is_running'].clear() 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_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_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_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: if not args.bypass_prediction:
procs.append( procs.append(
ExceptionHandlingProcess(target=run_prediction_server, kwargs={'config': args, 'is_running':isRunning}, name='inference'), ExceptionHandlingProcess(target=run_prediction_server, kwargs={'config': args, 'is_running':isRunning}, name='inference'),