Skip to content

Commit

Permalink
Merge pull request #26 from readysettech/only_online_hosts
Browse files Browse the repository at this point in the history
Filter out hosts that are OFFLINE_SOFT or OFFLINE_HARD
  • Loading branch information
altmannmarcelo authored Nov 4, 2024
2 parents b1c14a8 + a80e710 commit d2277a8
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 @@ -39,7 +39,7 @@ impl ProxySQL {
.expect("Failed to create ProxySQL connection");

let query = format!(
"SELECT hostname, port, status, comment FROM mysql_servers WHERE hostgroup_id = {}",
"SELECT hostname, port, status, comment FROM mysql_servers WHERE hostgroup_id = {} AND status IN ('ONLINE', 'SHUNNED')",
config.readyset_hostgroup
);
let results: Vec<(String, u16, String, String)> = conn.query(query).unwrap();
Expand Down

0 comments on commit d2277a8

Please sign in to comment.