Add run_id to VerticesOrderResponse

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-27 15:30:47 -03:00
commit 99803c53f7
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import time
from typing import Optional
import uuid
from fastapi import (
APIRouter,
@ -120,7 +121,8 @@ async def get_vertices(
# Now vertices is a list of lists
# We need to get the id of each vertex
# and return the same structure but only with the ids
return VerticesOrderResponse(ids=vertices)
run_id = uuid.uuid4()
return VerticesOrderResponse(ids=vertices, run_id=run_id)
except Exception as exc:
logger.error(f"Error checking build status: {exc}")

View file

@ -225,6 +225,7 @@ class ApiKeyCreateRequest(BaseModel):
class VerticesOrderResponse(BaseModel):
ids: List[List[str]]
run_id: UUID
class ResultDataResponse(BaseModel):