Compare commits

..

No commits in common. "d1c5b26d1d426ae1b8c18746739f490efa9ea647" and "7f46dea60000a8c32d5e2e22a4c3dc27bf567d88" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

@ -8,6 +8,6 @@ RUN pip install -r requirements.txt
COPY . .
ENV PYTHONUNBUFFERED=1
ENV PYTHONUNBUFFERED 1
ENTRYPOINT ["python", "main.py"]

View File

@ -23,9 +23,9 @@ class Response(pydantic.BaseModel):
async def execute(queue: typing.Annotated[str, fastapi.Header()]) -> Response:
try:
task = await tasks.take_task(queue)
if not task:
return Response(task=None)
return Response(task=Task(id=str(task._id), attempt=task.attempts, payload=task.payload))
except Exception as e:
print("GOT ERROR", e)
print('GOT ERROR', e)
return Response(task=None)
if not task:
return Response(task=None)
return Response(task=Task(id=str(task._id), attempt=task.attempts, payload=task.payload))