Move execute_worker_task to MonitorInstance

The function is rather general and may of use to other monitor modules.
This commit is contained in:
Esa Korhonen
2018-07-23 14:35:42 +03:00
parent 27084f1368
commit b421e56d1c
4 changed files with 56 additions and 36 deletions

View File

@ -104,7 +104,6 @@ protected:
void process_state_changes();
private:
typedef std::function<void ()> GenericFunction;
struct CycleInfo
{
@ -192,7 +191,6 @@ private:
MariaDBServer* get_server_info(MXS_MONITORED_SERVER* db);
MariaDBServer* get_server(int64_t id);
bool execute_manual_command(GenericFunction command, json_t** error_out);
bool execute_worker_task(GenericFunction func);
std::string diagnostics_to_string() const;
json_t* diagnostics_to_json() const;