refactor: use endpoint_id instead of endpoint name for routing
- Update route_payload to use endpoint_id instead of endpoint name - Update AuthData to expect endpoint_id (int) instead of endpoint (str) - Update ClientState to track endpoint_id - Update comfyui client functions to use endpoint_id - Fetch endpoint info (id + api_key) instead of just api_key This aligns with the autoscaler changes in AUTO-848 that switched to ID-based endpoint lookups for improved security and consistency.
This commit is contained in:
@@ -60,7 +60,7 @@ def do_one(endpoint_name: str,
|
||||
worker_session):
|
||||
try:
|
||||
workload = payload.count_workload()
|
||||
route_payload = {"endpoint": endpoint_name, "api_key": endpoint_api_key, "cost": workload}
|
||||
route_payload = {"endpoint_id": endpoint_id, "api_key": endpoint_api_key, "cost": workload}
|
||||
headers = {"Authorization": f"Bearer {endpoint_api_key}"}
|
||||
start = time.time()
|
||||
r0 = route_session.post(urljoin(server_url, "/route/"), json=route_payload, headers=headers, timeout=4)
|
||||
|
||||
Reference in New Issue
Block a user