mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Split add job helper (#45)
* Fix issue with engine not being available to download * Add version caches to ffmpeg downloader * Remove some test parameters * "releases" should be "release" in linux ffmpeg url * CPU was incorrectly reported as OS * Fix naming structure for FFMPEG downloads for linux * More linux ffmpeg work * Improved error handling * WIP * Consolidate platform reporting to not use platform directly * Fix missing folder name * Fix project output naming * Undo config.yaml commit * Add is_engine_available API call * Fix issue where subjobs would not find servers
This commit is contained in:
@@ -195,6 +195,7 @@ class DistributedJobManager:
|
||||
|
||||
# Check availability
|
||||
available_servers = cls.find_available_servers(worker.renderer)
|
||||
logger.debug(f"Splitting into subjobs - Available servers: {available_servers}")
|
||||
subjob_servers = cls.distribute_server_work(worker.start_frame, worker.end_frame, available_servers)
|
||||
local_hostname = socket.gethostname()
|
||||
|
||||
@@ -323,17 +324,17 @@ class DistributedJobManager:
|
||||
return server_breakdown
|
||||
|
||||
@staticmethod
|
||||
def find_available_servers(renderer):
|
||||
def find_available_servers(engine_name):
|
||||
"""
|
||||
Scan the Zeroconf network for currently available render servers supporting a specific renderer.
|
||||
Scan the Zeroconf network for currently available render servers supporting a specific engine.
|
||||
|
||||
:param renderer: str, The renderer type to search for
|
||||
:param engine_name: str, The engine type to search for
|
||||
:return: A list of dictionaries with each dict containing hostname and cpu_count of available servers
|
||||
"""
|
||||
available_servers = []
|
||||
for hostname in ZeroconfServer.found_clients():
|
||||
response = RenderServerProxy(hostname).get_status()
|
||||
if response and response.get('renderers', {}).get(renderer, {}).get('is_available', False):
|
||||
available_servers.append({'hostname': hostname, 'cpu_count': int(response['cpu_count'])})
|
||||
response = RenderServerProxy(hostname).is_engine_available(engine_name)
|
||||
if response and response.get('available', False):
|
||||
available_servers.append(response)
|
||||
|
||||
return available_servers
|
||||
|
||||
Reference in New Issue
Block a user