mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
REST API endpoint streamlining and cleanup (#133)
* Consolidate engine_info api calls * Change api methods to use POST when possible * Delete engine API cleanup * Remove redundant installed_engines endpoint * Update proxy to use similar named methods to new API calls * More API cleanup * Jobs API cleanup * More jobs API cleanup * Fix add jobs error due to null queue * Remove unnecessary full_status and snapshot API endpoints * Streamline add job POST endpoint * Fix test after method name change
This commit is contained in:
@@ -172,7 +172,7 @@ class DistributedJobManager:
|
||||
subjob_id = child_key.split('@')[0]
|
||||
subjob_hostname = child_key.split('@')[-1]
|
||||
|
||||
subjob_data = RenderServerProxy(subjob_hostname).get_job_info(subjob_id)
|
||||
subjob_data = RenderServerProxy(subjob_hostname).get_job(subjob_id)
|
||||
if not subjob_data:
|
||||
logger.warning(f"No response from {subjob_hostname}")
|
||||
parent_job.children[child_key]['download_status'] = f'error: No response from {subjob_hostname}'
|
||||
@@ -260,7 +260,7 @@ class DistributedJobManager:
|
||||
subjob['engine_version'] = parent_worker.engine_version
|
||||
logger.debug(f"Posting subjob with frames {subjob['start_frame']}-"
|
||||
f"{subjob['end_frame']} to {server_hostname}")
|
||||
post_results = RenderServerProxy(server_hostname).post_job_to_server(
|
||||
post_results = RenderServerProxy(server_hostname).create_job(
|
||||
file_path=project_path, job_data=subjob)
|
||||
return post_results
|
||||
|
||||
@@ -276,7 +276,7 @@ class DistributedJobManager:
|
||||
host_properties = ZeroconfServer.get_hostname_properties(hostname)
|
||||
if host_properties.get('api_version') == API_VERSION:
|
||||
if not system_os or (system_os and system_os == host_properties.get('system_os')):
|
||||
response = RenderServerProxy(hostname).is_engine_available(engine_name)
|
||||
response = RenderServerProxy(hostname).get_engine_availability(engine_name)
|
||||
if response and response.get('available', False):
|
||||
found_available_servers.append(response)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user