added postgresql probe

This commit is contained in:
roberto@oneiric64
2011-11-26 12:44:38 +01:00
parent 571029cfd3
commit a1564a44fa
7 changed files with 185 additions and 20 deletions
+4 -2
View File
@@ -224,13 +224,15 @@ PyObject *py_uwsgi_add_cron(PyObject * self, PyObject * args) {
PyObject *py_uwsgi_add_probe(PyObject * self, PyObject * args) {
uint8_t uwsgi_signal;
int timeout = 0;
int freq = 0;
char *probe, *probe_args;
if (!PyArg_ParseTuple(args, "Bss:add_probe", &uwsgi_signal, &probe, &probe_args)) {
if (!PyArg_ParseTuple(args, "Bss|ii:add_probe", &uwsgi_signal, &probe, &probe_args, &timeout, &freq)) {
return NULL;
}
if (uwsgi_add_probe(uwsgi_signal, probe ,probe_args))
if (uwsgi_add_probe(uwsgi_signal, probe, probe_args, timeout, freq))
return PyErr_Format(PyExc_ValueError, "unable to add probe");
Py_INCREF(Py_None);