MCPcopy Create free account
hub / github.com/ceph/ceph / shutdown

Method shutdown

src/mgr/PyModuleRunner.cc:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void PyModuleRunner::shutdown()
84{
85 ceph_assert(pClassInstance != nullptr);
86
87 Gil gil(py_module->pMyThreadState, true);
88
89 auto pValue = PyObject_CallMethod(pClassInstance,
90 const_cast<char*>("shutdown"), nullptr);
91
92 if (pValue != NULL) {
93 Py_DECREF(pValue);
94 } else {
95 derr << "Failed to invoke shutdown() on " << get_name() << dendl;
96 derr << handle_pyerror(true, get_name(), "PyModuleRunner::shutdown") << dendl;
97 }
98 if (py_module->perfcounter) {
99 py_module->perfcounter->set(py_module->l_pym_alive, 0);
100 }
101 dead = true;
102}
103
104void PyModuleRunner::log(const std::string &record)
105{

Callers

nothing calls this directly

Calls 3

handle_pyerrorFunction · 0.85
get_nameFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected