Add missing docstrings and pylint improvements (#130)

This commit is contained in:
2026-01-20 23:13:38 -06:00
committed by GitHub
parent 74dce5cc3d
commit e8992fc91a
8 changed files with 312 additions and 83 deletions

View File

@@ -16,7 +16,7 @@ from src.engines.engine_manager import EngineManager
from src.render_queue import RenderQueue
from src.utilities.config import Config
from src.utilities.misc_helper import (get_gpu_info, current_system_cpu, current_system_os,
current_system_os_version, current_system_cpu_brand, check_for_updates)
current_system_os_version, current_system_cpu_brand)
from src.utilities.zeroconf_server import ZeroconfServer
from src.version import APP_NAME, APP_VERSION
@@ -38,17 +38,16 @@ class ZordonServer:
Config.load_config(config_path)
# configure default paths
EngineManager.engines_path = Path(Config.upload_folder).expanduser()/ "engines"
EngineManager.engines_path = str(Path(Config.upload_folder).expanduser()/ "engines")
os.makedirs(EngineManager.engines_path, exist_ok=True)
PreviewManager.storage_path = Path(Config.upload_folder).expanduser() / "previews"
self.api_server = None
self.server_hostname = None
self.server_hostname: str = socket.gethostname()
def start_server(self):
def existing_process(process_name):
import psutil
current_pid = os.getpid()
current_process = psutil.Process(current_pid)
for proc in psutil.process_iter(['pid', 'name', 'ppid']):
@@ -79,7 +78,7 @@ class ZordonServer:
ServerProxyManager.subscribe_to_listener()
DistributedJobManager.subscribe_to_listener()
# get hostname
# update hostname
self.server_hostname = socket.gethostname()
# configure and start API server