(render_devices, active_devices)
| 464 | |
| 465 | |
| 466 | def update_render_threads(render_devices, active_devices): |
| 467 | devices_to_start, devices_to_stop = device_manager.get_device_delta(render_devices, active_devices) |
| 468 | log.debug(f"devices_to_start: {devices_to_start}") |
| 469 | log.debug(f"devices_to_stop: {devices_to_stop}") |
| 470 | |
| 471 | for device in devices_to_stop: |
| 472 | if is_alive(device) <= 0: |
| 473 | log.debug(f"{device} is not alive") |
| 474 | continue |
| 475 | if not stop_render_thread(device): |
| 476 | log.warn(f"{device} could not stop render thread") |
| 477 | |
| 478 | for device in devices_to_start: |
| 479 | if is_alive(device) >= 1: |
| 480 | log.debug(f"{device} already registered.") |
| 481 | continue |
| 482 | if not start_render_thread(device): |
| 483 | log.warn(f"{device} failed to start.") |
| 484 | |
| 485 | if is_alive() <= 0: # No running devices, probably invalid user config. |
| 486 | raise EnvironmentError( |
| 487 | 'ERROR: No active render devices! Please verify the "render_devices" value in config.json' |
| 488 | ) |
| 489 | |
| 490 | log.debug(f"active devices: {get_devices()['active']}") |
| 491 | |
| 492 | |
| 493 | def shutdown_event(): # Signal render thread to close on shutdown |
nothing calls this directly
no test coverage detected