1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

allow running db queries on sharded db

This commit is contained in:
Robin Appelman 2025-08-22 18:16:06 +02:00
commit 89280d9371
3 changed files with 73 additions and 11 deletions

View file

@ -166,9 +166,22 @@ async fn main() -> Result<ExitCode> {
filter,
root,
command,
index,
} => {
let cloud = Cloud::get_by_filter(&docker, filter, &config).await?;
cloud.db().exec(&docker, &cloud.id, root, &command).await?;
if Some("all") == index.as_deref() {
for index in ["1", "2", "3", "4"] {
cloud
.db()
.exec(&docker, &cloud.id, root, &command, Some(index))
.await?;
}
} else {
cloud
.db()
.exec(&docker, &cloud.id, root, &command, index.as_deref())
.await?;
}
}
HazeArgs::Open { filter } => {
let cloud = Cloud::get_by_filter(&docker, filter, &config).await?;