fix
This commit is contained in:
@@ -25,5 +25,5 @@ class Response(pydantic.BaseModel):
|
||||
async def execute(queue: typing.Annotated[str, fastapi.Header()]) -> Response:
|
||||
task = await tasks.take_task(queue)
|
||||
if not task:
|
||||
raise fastapi.HTTPException(404)
|
||||
return Response(id=str(task._id), attempt=task.attempts, payload=task.payload, task=Task(id=str(task._id), attempt=task.attempts, payload=task.payload))
|
||||
return Response(task=None)
|
||||
return Response(task=Task(id=str(task._id), attempt=task.attempts, payload=task.payload))
|
||||
|
||||
Reference in New Issue
Block a user