mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-01 11:15:57 +00:00
added mule messaging subsystem
This commit is contained in:
@@ -525,11 +525,8 @@ void init_uwsgi_embedded_module() {
|
||||
}
|
||||
}
|
||||
|
||||
uwsgi_log("getting exported opts\n");
|
||||
|
||||
PyObject *py_opt_dict = PyDict_New();
|
||||
for (i = 0; i < uwsgi.exported_opts_cnt; i++) {
|
||||
uwsgi_log("%s = %s\n", uwsgi.exported_opts[i]->key, uwsgi.exported_opts[i]->value);
|
||||
if (PyDict_Contains(py_opt_dict, PyString_FromString(uwsgi.exported_opts[i]->key))) {
|
||||
PyObject *py_opt_item = PyDict_GetItemString(py_opt_dict, uwsgi.exported_opts[i]->key);
|
||||
if (PyList_Check(py_opt_item)) {
|
||||
@@ -563,8 +560,6 @@ void init_uwsgi_embedded_module() {
|
||||
}
|
||||
}
|
||||
|
||||
uwsgi_log("DONE\n");
|
||||
|
||||
if (PyDict_SetItemString(up.embedded_dict, "opt", py_opt_dict)) {
|
||||
PyErr_Print();
|
||||
exit(1);
|
||||
@@ -910,9 +905,7 @@ void uwsgi_python_init_apps() {
|
||||
#endif
|
||||
}
|
||||
|
||||
uwsgi_log("init_pyargv\n");
|
||||
init_pyargv();
|
||||
uwsgi_log("init_pyargv\n");
|
||||
|
||||
#ifndef UWSGI_PYPY
|
||||
#ifdef UWSGI_EMBEDDED
|
||||
@@ -920,7 +913,6 @@ void uwsgi_python_init_apps() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uwsgi_log("init_pyargv\n");
|
||||
|
||||
#ifdef __linux__
|
||||
#if !defined(PYTHREE) && !defined(UWSGI_PYPY)
|
||||
@@ -935,8 +927,6 @@ void uwsgi_python_init_apps() {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
uwsgi_log("init_pyargv\n");
|
||||
|
||||
init_uwsgi_vars();
|
||||
|
||||
// setup app loaders
|
||||
@@ -1404,6 +1394,19 @@ void uwsgi_python_hijack(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
int uwsgi_python_mule(char *opt) {
|
||||
|
||||
if (uwsgi_endswith(opt, ".py")) {
|
||||
UWSGI_GET_GIL;
|
||||
uwsgi_pyimport_by_filename("__main__", opt);
|
||||
UWSGI_RELEASE_GIL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
struct uwsgi_plugin python_plugin = {
|
||||
|
||||
.name = "python",
|
||||
@@ -1440,6 +1443,8 @@ struct uwsgi_plugin python_plugin = {
|
||||
.signal_handler = uwsgi_python_signal_handler,
|
||||
.rpc = uwsgi_python_rpc,
|
||||
|
||||
.mule = uwsgi_python_mule,
|
||||
|
||||
.spooler = uwsgi_python_spooler,
|
||||
|
||||
.code_string = uwsgi_python_code_string,
|
||||
|
||||
Reference in New Issue
Block a user