class MonCommandCompletion : public Context
{
+ PyModules *py_modules;
PyObject *python_completion;
const std::string tag;
SafeThreadState pThreadState;
std::string outs;
bufferlist outbl;
- MonCommandCompletion(PyObject* ev, const std::string &tag_, PyThreadState *ts_)
- : python_completion(ev), tag(tag_), pThreadState(ts_)
+ MonCommandCompletion(
+ PyModules *py_modules_, PyObject* ev,
+ const std::string &tag_, PyThreadState *ts_)
+ : py_modules(py_modules_), python_completion(ev),
+ tag(tag_), pThreadState(ts_)
{
assert(python_completion != nullptr);
Py_INCREF(python_completion);
}
Py_DECREF(args);
}
- //global_handle->notify_all("command", tag);
+ py_modules->notify_all("command", tag);
}
};
}
Py_DECREF(set_fn);
- auto c = new MonCommandCompletion(completion, tag, PyThreadState_Get());
+ auto c = new MonCommandCompletion(self->py_modules,
+ completion, tag, PyThreadState_Get());
if (std::string(type) == "mon") {
self->py_modules->get_monc().start_mon_command(
{cmd_json},