I have fastapi that has an api that an input file performs machine learning processes on…
- User
I have fastapi that has an api that an input file performs machine learning processes on it and returns the processed json response. Between the clientend and the fastapi server there is an api gateway that sometimes gives 504 timeout error due to long processing time on client end. but the processing continues on server end even after timeout error taking extra server resources. I have a solution in mind to use celery with redis. Add the task in task queue once client hits the main processing api and return a task id, then hit another api to get processed results that wait till the results are done, during the wait if timeout error occurs on client end I can send another api call to kill the ongoing task. Is this solution feasible. What are plus and negative points of this. Also suggest a good approach to solve the problem. Thanks
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.