mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-03 23:48:22 +00:00
added register_signal tu lua api
This commit is contained in:
@@ -533,6 +533,14 @@ void uwsgi_uwsgi_config(char *module) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_NULL", PyInt_FromLong(KIND_NULL))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_WORKER", PyInt_FromLong(KIND_WORKER))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_EVENT", PyInt_FromLong(KIND_EVENT))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_SPOOLER", PyInt_FromLong(KIND_SPOOLER))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_ERLANG", PyInt_FromLong(KIND_ERLANG))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_PROXY", PyInt_FromLong(KIND_PROXY))) { PyErr_Print(); exit(1);}
|
||||
if (PyDict_SetItemString(up.embedded_dict, "KIND_MASTER", PyInt_FromLong(KIND_MASTER))) { PyErr_Print(); exit(1);}
|
||||
|
||||
PyObject *py_opt_dict = PyDict_New();
|
||||
for(i=0;i<uwsgi.exported_opts_cnt;i++) {
|
||||
if (PyDict_Contains(py_opt_dict, PyString_FromString(uwsgi.exported_opts[i]->key)) ) {
|
||||
|
||||
@@ -166,8 +166,6 @@ PyObject *py_uwsgi_register_timer(PyObject * self, PyObject * args) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uwsgi_log("signal_kind %d\n", signal_kind);
|
||||
|
||||
uwsgi_register_timer(uwsgi_signal, secs, signal_kind, handler, 0);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
@@ -186,8 +184,6 @@ PyObject *py_uwsgi_register_file_monitor(PyObject * self, PyObject * args) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uwsgi_log("signal_kind %d\n", signal_kind);
|
||||
|
||||
uwsgi_register_file_monitor(uwsgi_signal, filename, signal_kind, handler, 0);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
@@ -205,7 +201,6 @@ PyObject *py_uwsgi_register_signal(PyObject * self, PyObject * args) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uwsgi_log("REGISTER SIGNAL %d\n", uwsgi_signal);
|
||||
if (payload == NULL) {
|
||||
uwsgi_register_signal(uwsgi_signal, signal_kind, handler, 0, NULL, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user