I have a long (aprox. 1sec) diagnostic method to call for every user's request. This is perfectly fine to call this method after rendering and sending output to the user. How can I do that in Django? Any guidelines where I can find info about it? Unfortunately using any queue system cannot be considered.
-
"using any queue system cannot be considered" - why not?Daniel Roseman– Daniel Roseman2012-07-28 21:35:25 +00:00Commented Jul 28, 2012 at 21:35
-
@Daniel - now when I know more about request_finished it is possible. If I decided to do that before I would force me to update 30 action one by one - not very efficient.mrok– mrok2012-07-28 22:11:37 +00:00Commented Jul 28, 2012 at 22:11
Add a comment
|
1 Answer
You could use a request_finished signal and start your function at the end of every request. Look at https://docs.djangoproject.com/en/dev/ref/signals/#django.core.signals.request_finished