added uwsgi.after_req_hook

This commit is contained in:
roberto@oneiric64
2012-01-10 20:30:46 +01:00
parent 4c82a72fd5
commit db301531d0
4 changed files with 28 additions and 0 deletions
+10
View File
@@ -1053,6 +1053,16 @@ void uwsgi_python_init_apps() {
#endif
}
PyObject *uwsgi_dict = get_uwsgi_pydict("uwsgi");
if (uwsgi_dict) {
up.after_req_hook = PyDict_GetItemString(uwsgi_dict, "after_req_hook");
if (up.after_req_hook) {
Py_INCREF(up.after_req_hook);
up.after_req_hook_args = PyTuple_New(0);
Py_INCREF(up.after_req_hook_args);
}
}
}
void uwsgi_python_master_fixup(int step) {