mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Zeroconf reports system properties (#59)
* Zeroconf.found_clients() now returns dicts of clients, not just hostnames * Adjustments to distributed_job_manager.py * Undo config change * Report system metrics (cpu, os, etc) via zeroconf_server.py * Zeroconf.found_clients() now returns dicts of clients, not just hostnames * Adjustments to distributed_job_manager.py * Undo config change * Zeroconf.found_clients() now returns dicts of clients, not just hostnames * Adjustments to distributed_job_manager.py * Undo config change * Adjustments to distributed_job_manager.py * Undo config change * Rename ZeroconfServer.found_clients() to found_hostnames()
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import logging
|
||||
import multiprocessing
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
@@ -277,7 +278,7 @@ def snapshot():
|
||||
@server.get('/api/_detected_clients')
|
||||
def detected_clients():
|
||||
# todo: dev/debug only. Should not ship this - probably.
|
||||
return ZeroconfServer.found_clients()
|
||||
return ZeroconfServer.found_hostnames()
|
||||
|
||||
|
||||
# New version
|
||||
@@ -548,6 +549,9 @@ def start_server():
|
||||
|
||||
logger.info(f"Starting Zordon Render Server - Hostname: '{server.config['HOSTNAME']}:'")
|
||||
ZeroconfServer.configure("_zordon._tcp.local.", server.config['HOSTNAME'], server.config['PORT'])
|
||||
ZeroconfServer.properties = {'system_cpu': current_system_cpu(), 'system_cpu_cores': multiprocessing.cpu_count(),
|
||||
'system_os': current_system_os(),
|
||||
'system_os_version': current_system_os_version()}
|
||||
ZeroconfServer.start()
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user