MXS-1775 Factor out post-processing

Further adjustments for being able to move MariaDBMonitor on
top of MonitorInstance::main().
This commit is contained in:
Johan Wikman
2018-06-05 15:29:17 +03:00
parent 71194d83d3
commit 329a6df662
4 changed files with 50 additions and 30 deletions

View File

@ -2906,6 +2906,11 @@ void MonitorInstance::post_loop()
{
}
void MonitorInstance::process_state_changes()
{
mon_process_state_changes(m_monitor, m_script.empty() ? NULL : m_script.c_str(), m_events);
}
void MonitorInstance::main()
{
pre_loop();
@ -2916,11 +2921,7 @@ void MonitorInstance::main()
tick();
/**
* After updating the status of all servers, check if monitor events
* need to be launched.
*/
mon_process_state_changes(m_monitor, m_script.empty() ? NULL : m_script.c_str(), m_events);
process_state_changes();
mon_hangup_failed_servers(m_monitor);
store_server_journal(m_monitor, m_master);