Skip to content

Commit

Permalink
Change host status
Browse files Browse the repository at this point in the history
Change host status before updating the hostgroup, so it reflects the
correct status.
  • Loading branch information
altmannmarcelo committed Oct 29, 2024
1 parent a519420 commit b1c14a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ impl ProxySQL {
)
.as_str(),
);
host.change_status(status);
let _ = self.conn.query_drop(format!(
"UPDATE mysql_servers SET status = '{}' {}",
host.get_status(),
where_clause
));
host.change_status(status);
let _ = self.conn.query_drop("LOAD MYSQL SERVERS TO RUNTIME");
let _ = self.conn.query_drop("SAVE MYSQL SERVERS TO DISK");
}
Expand Down

0 comments on commit b1c14a8

Please sign in to comment.