added --zerg-fallback

This commit is contained in:
roberto@precise64
2012-02-11 21:02:15 +01:00
parent 1017dda1ec
commit 069f517b04
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -344,6 +344,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
#endif
{"reuse-port", no_argument, 0, "enable REUSE_PORT flag on socket (BSD only)", uwsgi_opt_true, &uwsgi.reuse_port, 0},
{"zerg", required_argument, 0, "attach to a zerg server", uwsgi_opt_set_str, &uwsgi.zerg_node, 0},
{"zerg-fallback", no_argument, 0, "fallback to normal sockets if the zerg server is not available", uwsgi_opt_true, &uwsgi.zerg_fallback, 0},
{"zerg-server", required_argument, 0, "enable the zerg server on the specified UNIX socket", uwsgi_opt_set_str, &uwsgi.zerg_server, UWSGI_OPT_MASTER},
// FUTURE additions
//{"zerg-pool", required_argument, 0, "create a zerg pool", uwsgi_opt_zerg_pool, NULL, 0},
@@ -1957,6 +1958,9 @@ int uwsgi_start(void *v_argv) {
if (uwsgi.zerg_node) {
if (uwsgi_zerg_attach(uwsgi.zerg_node)) {
if (!uwsgi.zerg_fallback) {
exit(1);
}
}
}
+1
View File
@@ -1069,6 +1069,7 @@ struct uwsgi_server {
int *zerg;
char *zerg_server;
char *zerg_node;
int zerg_fallback;
int zerg_server_fd;
// security