Closed shoang22 closed 2 months ago
Hi, and thanks for your interest in the project. I wonder where are these logs from? From fastapi app or from workers? Doesn't seem like it's a problem of taskiq, but natspy.
Seems like they try to read from the same socket from two tasks within the loop. Becuase I don't see in your code anything that tries to read from any socket.
@chandr-andr, you better know natspy, have you ever faced such issue before?
@shoang22, @chandr-andr has noticed that you run broker.startup
on every request. Please don't do it. Run startup only once per application in startup. Maybe it's causing issues.
@s3rius @chandr-andr yep, that was indeed the issue. Removing seems to fix the problem.
Hello,
Thanks for all your amazing work. I have a task that uses Langchain's
RecursiveCharacterTextSplitter
to split text into chunks, counts the chunks, and stores them in redis:This is called from the following route:
When I try to make multiple calls in a row to
/block
, I expect a result with the task_id returned right away for each call. Not only does this not happen, but I get the following error:Is there something I'm doing wrong? Not sure what to do at this point?
Here's the full repo for reference: https://github.com/shoang22/toy_fastapi_app