Skip to content

Commit

Permalink
Merge pull request #32 from readysettech/cache-creation-set-schema
Browse files Browse the repository at this point in the history
Force cache creation to set default schema
  • Loading branch information
altmannmarcelo authored Dec 2, 2024
2 parents c58e79e + 670e6ef commit 8b8fc2b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,13 @@ impl QueryDiscovery {
queries_added_or_change = true;
if !proxysql.dry_run() {
proxysql.get_online_hosts().iter_mut().for_each(|host| {
host.cache_query(query).expect(
format!(
host.cache_query(query).unwrap_or_else(|_| {
panic!(
"Failed to create readyset cache on host {}:{}",
host.get_hostname(),
host.get_port()
)
.as_str(),
);
});
});
proxysql
.add_as_query_rule(query)
Expand Down

0 comments on commit 8b8fc2b

Please sign in to comment.