: module_config(module_config_), daemon_state(ds), cluster_state(cs),
monc(mc), clog(clog_), audit_clog(audit_clog_), objecter(objecter_),
client(client_), finisher(f),
+ cmd_finisher(g_ceph_context, "cmd_finisher", "cmdfin"),
server(server), py_module_registry(pmr), lock("ActivePyModules")
{
store_cache = std::move(store_data);
+ cmd_finisher.start();
}
ActivePyModules::~ActivePyModules() = default;
lock.Lock();
}
+ cmd_finisher.wait_for_empty();
+ cmd_finisher.stop();
+
modules.clear();
}
Objecter &objecter;
Client &client;
Finisher &finisher;
+public:
+ Finisher cmd_finisher;
+private:
DaemonServer &server;
PyModuleRegistry &py_module_registry;
{},
&command_c->outbl,
&command_c->outs,
- c);
+ new C_OnFinisher(c, &self->py_modules->cmd_finisher));
} else if (std::string(type) == "osd") {
std::string err;
uint64_t osd_id = strict_strtoll(name, 10, &err);
&tid,
&command_c->outbl,
&command_c->outs,
- command_c);
+ new C_OnFinisher(command_c, &self->py_modules->cmd_finisher));
} else if (std::string(type) == "mds") {
int r = self->py_modules->get_client().mds_command(
name,
{},
&command_c->outbl,
&command_c->outs,
- command_c);
+ new C_OnFinisher(command_c, &self->py_modules->cmd_finisher));
if (r != 0) {
string msg("failed to send command to mds: ");
msg.append(cpp_strerror(r));
&tid,
&command_c->outbl,
&command_c->outs,
- command_c);
+ new C_OnFinisher(command_c, &self->py_modules->cmd_finisher));
PyEval_RestoreThread(tstate);
return nullptr;
} else {