Skip to content

Commit 8b8fc2b

Browse files
Merge pull request #32 from readysettech/cache-creation-set-schema
Force cache creation to set default schema
2 parents c58e79e + 670e6ef commit 8b8fc2b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/queries.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,13 @@ impl QueryDiscovery {
195195
queries_added_or_change = true;
196196
if !proxysql.dry_run() {
197197
proxysql.get_online_hosts().iter_mut().for_each(|host| {
198-
host.cache_query(query).expect(
199-
format!(
198+
host.cache_query(query).unwrap_or_else(|_| {
199+
panic!(
200200
"Failed to create readyset cache on host {}:{}",
201201
host.get_hostname(),
202202
host.get_port()
203203
)
204-
.as_str(),
205-
);
204+
});
206205
});
207206
proxysql
208207
.add_as_query_rule(query)

0 commit comments

Comments
 (0)