mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 21:49:23 -05:00
Remove redundant installed_engines endpoint
This commit is contained in:
@@ -83,18 +83,24 @@ The system works by:
|
|||||||
Jobs can be submitted via the desktop UI or programmatically via the API:
|
Jobs can be submitted via the desktop UI or programmatically via the API:
|
||||||
|
|
||||||
- **Via UI**: Use the desktop interface to upload project files, specify render settings, and queue jobs.
|
- **Via UI**: Use the desktop interface to upload project files, specify render settings, and queue jobs.
|
||||||
- **Via API**: Send POST requests to `/api/jobs` with job configuration in JSON format.
|
- **Via API**: Send `POST` requests to `/api/add_job` with job configuration in JSON format.
|
||||||
|
|
||||||
Example API request:
|
Example API request:
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:5000/api/jobs \
|
curl -X POST http://localhost:8080/api/add_job \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"engine": "blender",
|
"name": "example-render",
|
||||||
"project_path": "/path/to/project.blend",
|
"engine_name": "blender",
|
||||||
"output_path": "/path/to/output",
|
"local_path": "/path/to/project.blend",
|
||||||
"frames": "1-100",
|
"output_path": "example-output",
|
||||||
"settings": {"resolution": "1920x1080"}
|
"start_frame": 1,
|
||||||
|
"end_frame": 100,
|
||||||
|
"args": {
|
||||||
|
"export_format": "PNG",
|
||||||
|
"resolution": [1920, 1080]
|
||||||
|
},
|
||||||
|
"enable_split_jobs": false
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -103,9 +109,14 @@ curl -X POST http://localhost:5000/api/jobs \
|
|||||||
- **UI**: View job status, progress, logs, and worker availability in real-time.
|
- **UI**: View job status, progress, logs, and worker availability in real-time.
|
||||||
- **API Endpoints**:
|
- **API Endpoints**:
|
||||||
- `GET /api/jobs`: List all jobs
|
- `GET /api/jobs`: List all jobs
|
||||||
- `GET /api/jobs/{id}`: Get job details
|
- `GET /api/job/<job_id>`: Get job details
|
||||||
- `DELETE /api/jobs/{id}`: Cancel a job
|
- `POST /api/job/<job_id>/cancel`: Cancel a job
|
||||||
- `GET /api/workers`: List connected workers
|
- `POST /api/job/<job_id>/delete`: Delete a job
|
||||||
|
- `GET /api/status`: Get server and queue status
|
||||||
|
- `GET /api/engines`: List engine information
|
||||||
|
|
||||||
|
For the full endpoint reference, see [`docs/api.html`](docs/api.html) or
|
||||||
|
[`docs/API.md`](docs/API.md).
|
||||||
|
|
||||||
#### Worker Management
|
#### Worker Management
|
||||||
|
|
||||||
|
|||||||
@@ -380,16 +380,6 @@ def get_engine_for_filename():
|
|||||||
return f"Error: cannot find a suitable engine for '{filename}'", 400
|
return f"Error: cannot find a suitable engine for '{filename}'", 400
|
||||||
return found_engine.name()
|
return found_engine.name()
|
||||||
|
|
||||||
@server.get('/api/installed_engines')
|
|
||||||
def get_installed_engines():
|
|
||||||
result = {}
|
|
||||||
for engine_class in EngineManager.supported_engines():
|
|
||||||
data = EngineManager.all_version_data_for_engine(engine_class.name())
|
|
||||||
if data:
|
|
||||||
result[engine_class.name()] = data
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def _validated_engine_response_type():
|
def _validated_engine_response_type():
|
||||||
response_type = request.args.get('response_type', 'standard')
|
response_type = request.args.get('response_type', 'standard')
|
||||||
if response_type not in ['full', 'standard']:
|
if response_type not in ['full', 'standard']:
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ class RenderServerProxy:
|
|||||||
return response.text
|
return response.text
|
||||||
|
|
||||||
def get_installed_engines(self, timeout=5):
|
def get_installed_engines(self, timeout=5):
|
||||||
return self.request_data(f'installed_engines', timeout)
|
return self.get_all_engine_info(timeout=timeout)
|
||||||
|
|
||||||
def is_engine_available(self, engine_name:str, timeout=5):
|
def is_engine_available(self, engine_name:str, timeout=5):
|
||||||
return self.request_data(f'{engine_name}/is_available', timeout)
|
return self.request_data(f'{engine_name}/is_available', timeout)
|
||||||
|
|||||||
Reference in New Issue
Block a user