----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <[email protected]>
> Do: "uWSGI developers and users list" <[email protected]>
> Wysłane: wtorek, 10 styczeń 2012 19:50:58
> Temat: Re: [uWSGI] after req hook
> 
> Hi, if i understand correctly you need a way to have only a part of
> your
> code running without harakiri ?


Hi.
Not only without harakiri. After each request.
And if during the request occurs harakiri or other execution, this additional 
part of the code should be done.

eg.


import os
import uwsgi
import trac.web.main

os.environ['TRAC_ENV'] = '<absolute_path_to_trac_project>'
applications = {'/trac':trac.web.main.dispatch_request}

def after_req(id):
  print('This part is executed after every request no matter what (execution, 
harakiri, etc.).')

uwsgi.after_req_hook = after_req



-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to