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:
2026-06-06 12:04:52 -05:00
committed by GitHub
parent 24eb7b5616
commit f0be78adcc
15 changed files with 1255 additions and 203 deletions
+6 -6
View File
@@ -2,6 +2,7 @@ import logging
import os
import time
import unittest
from pathlib import Path
from src.api.server_proxy import RenderServerProxy
@@ -38,9 +39,8 @@ class SubmissionTestCase(unittest.TestCase):
msg=f'Server not reachable at {SERVER_HOST}:{SERVER_PORT}')
def test_submit_job(self):
sample_file_path = os.path.join(os.path.dirname(__file__), 'resources',
'batman_sample.blend')
self.assertTrue(os.path.exists(sample_file_path),
sample_file_path = Path(__file__).parent / 'resources' / 'batman_sample.blend'
self.assertTrue(sample_file_path.exists(),
msg=f'Test file not found: {sample_file_path}')
sample_job = {
@@ -52,8 +52,8 @@ class SubmissionTestCase(unittest.TestCase):
'enable_split_jobs': False,
}
response = self.render_server.post_job_to_server(
file_path=sample_file_path, job_list=[sample_job])
response = self.render_server.create_job(
file_path=sample_file_path, job_data=sample_job)
self.assertIsNotNone(response, msg='No response from server')
self.assertTrue(response.ok, msg=f'Server returned {response.status_code}')
@@ -68,7 +68,7 @@ class SubmissionTestCase(unittest.TestCase):
file_count = 0
while True:
update_response = self.render_server.get_job_info(self.__class__.test_job_id)
update_response = self.render_server.get_job(self.__class__.test_job_id)
if update_response:
print(f"Status: {update_response['status']}")