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:
parent
54682a06b6
commit
89280d9371
3 changed files with 73 additions and 11 deletions
15
src/main.rs
15
src/main.rs
|
|
@ -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?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue