mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
More wip
This commit is contained in:
@@ -39,7 +39,7 @@ class DistributedJobManager:
|
|||||||
"""
|
"""
|
||||||
Responds to the 'frame_complete' pubsub message for local jobs.
|
Responds to the 'frame_complete' pubsub message for local jobs.
|
||||||
|
|
||||||
Parameters:
|
Args:
|
||||||
job_id (str): The ID of the job that has changed status.
|
job_id (str): The ID of the job that has changed status.
|
||||||
old_status (str): The previous status of the job.
|
old_status (str): The previous status of the job.
|
||||||
new_status (str): The new (current) status of the job.
|
new_status (str): The new (current) status of the job.
|
||||||
@@ -75,7 +75,7 @@ class DistributedJobManager:
|
|||||||
Responds to the 'status_change' pubsub message for local jobs.
|
Responds to the 'status_change' pubsub message for local jobs.
|
||||||
If it's a child job, it notifies the parent job about the status change.
|
If it's a child job, it notifies the parent job about the status change.
|
||||||
|
|
||||||
Parameters:
|
Args:
|
||||||
job_id (str): The ID of the job that has changed status.
|
job_id (str): The ID of the job that has changed status.
|
||||||
old_status (str): The previous status of the job.
|
old_status (str): The previous status of the job.
|
||||||
new_status (str): The new (current) status of the job.
|
new_status (str): The new (current) status of the job.
|
||||||
|
|||||||
16
src/init.py
16
src/init.py
@@ -1,11 +1,9 @@
|
|||||||
''' app/init.py '''
|
|
||||||
import logging
|
import logging
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
from src.api.api_server import start_server
|
from src.api.api_server import start_server
|
||||||
@@ -22,8 +20,10 @@ logger = logging.getLogger()
|
|||||||
|
|
||||||
|
|
||||||
def run(server_only=False) -> int:
|
def run(server_only=False) -> int:
|
||||||
"""
|
"""Initializes the application and runs it.
|
||||||
Initializes the application and runs it.
|
|
||||||
|
Args:
|
||||||
|
server_only: Run in server-only CLI mode. Default is False (runs in GUI mode).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: The exit status code.
|
int: The exit status code.
|
||||||
@@ -84,9 +84,7 @@ def run(server_only=False) -> int:
|
|||||||
'system_os_version': current_system_os_version()}
|
'system_os_version': current_system_os_version()}
|
||||||
ZeroconfServer.start()
|
ZeroconfServer.start()
|
||||||
logger.info(f"Zordon Render Server started - Hostname: {local_hostname}")
|
logger.info(f"Zordon Render Server started - Hostname: {local_hostname}")
|
||||||
|
RenderQueue.start() # Start evaluating the render queue
|
||||||
RenderQueue.evaluation_inverval = Config.queue_eval_seconds
|
|
||||||
RenderQueue.start()
|
|
||||||
|
|
||||||
# start in gui or server only (cli) mode
|
# start in gui or server only (cli) mode
|
||||||
logger.debug(f"Launching in {'server only' if server_only else 'GUI'} mode")
|
logger.debug(f"Launching in {'server only' if server_only else 'GUI'} mode")
|
||||||
@@ -137,8 +135,8 @@ def __setup_buffer_handler():
|
|||||||
|
|
||||||
buffer_handler = BufferingHandler()
|
buffer_handler = BufferingHandler()
|
||||||
buffer_handler.setFormatter(logging.getLogger().handlers[0].formatter)
|
buffer_handler.setFormatter(logging.getLogger().handlers[0].formatter)
|
||||||
logger = logging.getLogger()
|
new_logger = logging.getLogger()
|
||||||
logger.addHandler(buffer_handler)
|
new_logger.addHandler(buffer_handler)
|
||||||
return buffer_handler
|
return buffer_handler
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ class RenderQueue:
|
|||||||
last_saved_counts = {}
|
last_saved_counts = {}
|
||||||
is_running = False
|
is_running = False
|
||||||
__eval_thread = None
|
__eval_thread = None
|
||||||
evaluation_interval = 1
|
|
||||||
|
|
||||||
# --------------------------------------------
|
# --------------------------------------------
|
||||||
# Start / Stop Background Updates
|
# Start / Stop Background Updates
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ from src.render_queue import RenderQueue
|
|||||||
from src.utilities.misc_helper import get_time_elapsed, resources_dir, is_localhost
|
from src.utilities.misc_helper import get_time_elapsed, resources_dir, is_localhost
|
||||||
from src.utilities.status_utils import RenderStatus
|
from src.utilities.status_utils import RenderStatus
|
||||||
from src.utilities.zeroconf_server import ZeroconfServer
|
from src.utilities.zeroconf_server import ZeroconfServer
|
||||||
from .add_job import NewRenderJobForm
|
from src.ui.add_job import NewRenderJobForm
|
||||||
from .console import ConsoleWindow
|
from src.ui.console import ConsoleWindow
|
||||||
from .engine_browser import EngineBrowserWindow
|
from src.ui.engine_browser import EngineBrowserWindow
|
||||||
from .log_viewer import LogViewer
|
from src.ui.log_viewer import LogViewer
|
||||||
from .widgets.menubar import MenuBar
|
from src.ui.widgets.menubar import MenuBar
|
||||||
from .widgets.proportional_image_label import ProportionalImageLabel
|
from src.ui.widgets.proportional_image_label import ProportionalImageLabel
|
||||||
from .widgets.statusbar import StatusBar
|
from src.ui.widgets.statusbar import StatusBar
|
||||||
from .widgets.toolbar import ToolBar
|
from src.ui.widgets.toolbar import ToolBar
|
||||||
from src.api.serverproxy_manager import ServerProxyManager
|
from src.api.serverproxy_manager import ServerProxyManager
|
||||||
from src.utilities.misc_helper import launch_url
|
from src.utilities.misc_helper import launch_url
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user