Describe the solution you'd likesrc/interfaces/ReqRes.py contains class definitions for a web hook system, including POST request models.
The BasePredictor class contains some functions for implementing these web hooks (e.g. for long running inference tasks).
The current situation
Currently, POST requests have an optional web hook field that is ignored in all cases. The required functionality would be to add a conditional branch to API routes such that requests that contain a web hook model are added to a BackgroundTasks queue (https://fastapi.tiangolo.com/tutorial/background-tasks/) with an appropriate HTTP status code (received) and message. When the background task has finished, it should call the end-point in the web hook, setting HTTP headers as necessary.
Describe alternatives you've considered
The current situation is to await a POST request.
Describe the solution you'd like
src/interfaces/ReqRes.py
contains class definitions for a web hook system, including POST request models. The BasePredictor class contains some functions for implementing these web hooks (e.g. for long running inference tasks).The current situation Currently, POST requests have an optional web hook field that is ignored in all cases. The required functionality would be to add a conditional branch to API routes such that requests that contain a web hook model are added to a BackgroundTasks queue (https://fastapi.tiangolo.com/tutorial/background-tasks/) with an appropriate HTTP status code (received) and message. When the background task has finished, it should call the end-point in the web hook, setting HTTP headers as necessary.
Describe alternatives you've considered The current situation is to
await
a POST request.