added --no-harakiri-arh

This commit is contained in:
roberto@oneiric64
2012-01-11 05:05:15 +01:00
parent db301531d0
commit 0c712ac28d
3 changed files with 9 additions and 0 deletions
+5
View File
@@ -514,6 +514,11 @@ clear2:
void uwsgi_after_request_wsgi(struct wsgi_request *wsgi_req) {
if (up.after_req_hook) {
if (uwsgi.harakiri_no_arh) {
// leave harakiri mode
if (uwsgi.workers[uwsgi.mywid].harakiri > 0)
set_harakiri(0);
}
PyObject *arh = python_call(up.after_req_hook, up.after_req_hook_args, 0, NULL);
if (!arh) {
PyErr_Print();
+3
View File
@@ -50,6 +50,9 @@ static struct option long_base_options[] = {
{"workers", required_argument, 0, 'p'},
{"harakiri", required_argument, 0, 't'},
{"harakiri-verbose", no_argument, &uwsgi.harakiri_verbose, 1},
{"harakiri-no-arh", no_argument, &uwsgi.harakiri_no_arh, 1},
{"no-harakiri-arh", no_argument, &uwsgi.harakiri_no_arh, 1},
{"no-harakiri-after-req-hook", no_argument, &uwsgi.harakiri_no_arh, 1},
{"spooler-harakiri", required_argument, 0, LONG_ARGS_SPOOLER_HARAKIRI},
{"mule-harakiri", required_argument, 0, LONG_ARGS_MULE_HARAKIRI},
#ifdef UWSGI_XML
+1
View File
@@ -1338,6 +1338,7 @@ struct uwsgi_server {
char *pidfile2;
int harakiri_verbose;
int harakiri_no_arh;
char *magic_table[256];