| 81 | } |
| 82 | |
| 83 | void 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 | |
| 104 | void PyModuleRunner::log(const std::string &record) |
| 105 | { |
nothing calls this directly
no test coverage detected