diff --git a/docs/API.md b/docs/API.md index a171a89..d9c9a10 100644 --- a/docs/API.md +++ b/docs/API.md @@ -281,29 +281,6 @@ Known callers: - `RenderServerProxy.get_status()` -### `GET /api/snapshot` - -Returns local status, all jobs, and a timestamp. - -Known callers: - -- `full_status()` internally. - -Review note: no direct in-repo HTTP callers were found. It overlaps with -`/api/status` plus `/api/jobs`. - -### `GET /api/full_status` - -Returns a multi-server shaped status payload with the local server populated. - -Known callers: - -- `RenderServerProxy.get_full_status()` -- `dashboard.py` - -Review note: this currently reports only the local server. The response shape -suggests an intended future aggregation point. - ### `GET /api/presets` Returns `config/presets.yaml`. @@ -492,10 +469,6 @@ Review note: development/debug only. ## Redundancy and Cleanup Review -Likely redundant or overlapping routes: - -- `/api/snapshot` overlaps with `/api/status` and `/api/jobs`. It is currently - used internally by `/api/full_status`. Routes with no in-repo callers found: - `GET /api/jobs/status/` diff --git a/docs/api.html b/docs/api.html index 88d501c..2b9e811 100644 --- a/docs/api.html +++ b/docs/api.html @@ -406,18 +406,6 @@

Returns local system and queue status, including operating system, CPU, memory, job counts, hostname, port, app version, and API version.

-
-
GET/api/snapshot
-

Returns local status, all jobs, and a timestamp.

-
No direct in-repo HTTP callers were found. It overlaps with /api/status plus /api/jobs and is used internally by /api/full_status.
-
- -
-
GET/api/full_status
-

Returns a multi-server shaped status payload with the local server populated. Used by RenderServerProxy.get_full_status() and dashboard.py.

-
The response shape suggests an intended future aggregation point, but it currently reports only the local server.
-
-
GET/api/presets

Returns config/presets.yaml.

@@ -562,13 +550,6 @@

Cleanup Review

-

Likely Redundant Or Overlapping Routes

-
    -
  • /api/snapshot overlaps with /api/status and /api/jobs. It is currently used internally by /api/full_status.
  • -
-
- -

Routes With No In-Repo Callers Found

  • GET /api/jobs/status/<status_val>
  • diff --git a/src/api/api_server.py b/src/api/api_server.py index 6aaf249..ea7802b 100755 --- a/src/api/api_server.py +++ b/src/api/api_server.py @@ -206,29 +206,6 @@ def presets() -> Dict[str, Any]: return loaded_presets -@server.get('/api/full_status') -def full_status(): - full_results = {'timestamp': datetime.now().isoformat(), 'servers': {}} - - try: - snapshot_results = snapshot() - server_data = {'status': snapshot_results.get('status', {}), 'jobs': snapshot_results.get('jobs', {}), - 'is_online': True} - full_results['servers'][server.config['HOSTNAME']] = server_data - except Exception as e: - logger.error(f"Exception fetching full status: {e}") - - return full_results - - -@server.get('/api/snapshot') -def snapshot(): - server_status = status() - server_jobs = [x.json() for x in RenderQueue.all_jobs()] - server_data = {'status': server_status, 'jobs': server_jobs, 'timestamp': datetime.now().isoformat()} - return server_data - - @server.route('/api/status') def status(): return {"timestamp": datetime.now().isoformat(), diff --git a/src/api/server_proxy.py b/src/api/server_proxy.py index 5993f54..c90bb83 100644 --- a/src/api/server_proxy.py +++ b/src/api/server_proxy.py @@ -163,9 +163,6 @@ class RenderServerProxy: self.__update_job_cache(timeout, ignore_token) return self.__jobs_cache.copy() if self.__jobs_cache else None - def get_full_status(self, timeout=5): - return self.request_data('full_status', timeout=timeout) - def get_status(self): status = self.request_data('status') if status and not self.system_cpu: