mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 06:31:58 +00:00
support BROADCAST for clustering
This commit is contained in:
@@ -352,7 +352,7 @@ PyObject *py_uwsgi_register_rpc(PyObject * self, PyObject * args) {
|
||||
char *name;
|
||||
PyObject *func;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "sO|B:register_signal", &name, &func, &argc)) {
|
||||
if (!PyArg_ParseTuple(args, "sO|B:register_rpc", &name, &func, &argc)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -366,6 +366,23 @@ PyObject *py_uwsgi_register_rpc(PyObject * self, PyObject * args) {
|
||||
return Py_True;
|
||||
}
|
||||
|
||||
PyObject *py_uwsgi_attach_daemon(PyObject * self, PyObject * args) {
|
||||
|
||||
char *command = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s:attach_daemon", &command)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (uwsgi_attach_daemon(command)) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
Py_INCREF(Py_True);
|
||||
return Py_True;
|
||||
}
|
||||
|
||||
PyObject *py_uwsgi_register_signal(PyObject * self, PyObject * args) {
|
||||
|
||||
uint8_t uwsgi_signal;
|
||||
@@ -2251,6 +2268,8 @@ static PyMethodDef uwsgi_advanced_methods[] = {
|
||||
{"send", py_uwsgi_send, METH_VARARGS, ""},
|
||||
{"cl", py_uwsgi_cl, METH_VARARGS, ""},
|
||||
|
||||
{"attach_daemon", py_uwsgi_attach_daemon, METH_VARARGS, ""},
|
||||
|
||||
{"register_signal", py_uwsgi_register_signal, METH_VARARGS, ""},
|
||||
{"signal", py_uwsgi_signal, METH_VARARGS, ""},
|
||||
{"register_file_monitor", py_uwsgi_register_file_monitor, METH_VARARGS, ""},
|
||||
|
||||
Reference in New Issue
Block a user