I understand that WSGI Middleware's purpose is to extend functionality between a request and a response.
But can some of this code be run after the response is returned?
I need to store a request/response log in an external database, and wouldn't want this to slow the response times down.
Thanks! :)
Did you consider spawning a new thread or using a queue manager?
This way you can return the view and process the data in the background.
This answer here has more information:
How to fork a process in python/django?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With