Skip to content

Commit b1c14a8

Browse files
Change host status
Change host status before updating the hostgroup, so it reflects the correct status.
1 parent a519420 commit b1c14a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/proxysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ impl ProxySQL {
198198
)
199199
.as_str(),
200200
);
201+
host.change_status(status);
201202
let _ = self.conn.query_drop(format!(
202203
"UPDATE mysql_servers SET status = '{}' {}",
203204
host.get_status(),
204205
where_clause
205206
));
206-
host.change_status(status);
207207
let _ = self.conn.query_drop("LOAD MYSQL SERVERS TO RUNTIME");
208208
let _ = self.conn.query_drop("SAVE MYSQL SERVERS TO DISK");
209209
}

0 commit comments

Comments
 (0)