Il giorno 11/gen/2012, alle ore 11:10, Łukasz Wróblewski ha scritto:

> uwsgi.after_req_hook work fine, but no-harakiri-arh = 0/1 does not seem to 
> work.
> 
> [uwsgi]
> http = :8000
> chdir = /home/....
> master = 1
> single-interpreter = 1
> module = start
> log-5xx = 1
> vacuum = 1
> pep3333-input = 1
> processes = 3
> harakiri = 3
> harakiri-verbose = 1
> reload-mercy = 3
> touch-reload = start.py
> touch-reload = config.ini
> no-harakiri-arh = 0
> 
> 
> 
> 
> 
> import time
> import uwsgi
> 
> def application(env, start_response):
>  start_response('200 OK', [('Content-Type', 'text/html')])
>  #raise Exception('yyy')
>  time.sleep(10)
>  yield b"ok"
> 
> 
> def after_req():
>  print('************* after_req')
> 
> uwsgi.after_req_hook = after_req
> 
> 
> 
> Regardless of whether I use 0 or 1 for option no-harakiri-arh result is the 
> same:
> 
> 
> 
> spawned uWSGI worker 1 (pid: 5863, cores: 1)
> spawned uWSGI worker 2 (pid: 5864, cores: 1)
> spawned uWSGI worker 3 (pid: 5865, cores: 1)
> 

you have put a sleep in the request handler, not in the after_req_hook.

harakiri will be always available for request handler, will be disabled in 
after_req_hook on demand

--
Roberto De Ioris
http://unbit.it
JID: [email protected]

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to