MXS-2314 Define monitor state in terms of worker state
Worker::STOPPED -> MONITOR_STATE_STOPPED Worker::POLLING -> MONITOR_STATE_RUNNING Worker::PROCESSING -> MONITOR_STATE_RUNNING By defining the monitor state from the worker state there is no risk they will ever get out of sync. And there is one thing less to maintain.
This commit is contained in:
		| @ -738,7 +738,7 @@ bool MariaDBMonitor::check_sql_files() | ||||
| bool MariaDBMonitor::execute_manual_command(std::function<void(void)> command, json_t** error_out) | ||||
| { | ||||
|     bool rval = false; | ||||
|     if (monitor_state() != MONITOR_STATE_RUNNING) | ||||
|     if (state() != MONITOR_STATE_RUNNING) | ||||
|     { | ||||
|         PRINT_MXS_JSON_ERROR(error_out, "The monitor is not running, cannot execute manual command."); | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Johan Wikman
					Johan Wikman