mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
fix: broadcast event use file id (#6891)
- [x] fix: broadcast event use file id - [x] feat: add metrics for consistent hashing
This commit is contained in:
@@ -231,6 +231,14 @@ pub async fn cli() -> Result<bool, anyhow::Error> {
|
||||
.required(true)
|
||||
.help("snowflake id"),
|
||||
]),
|
||||
clap::Command::new("consistent-hash").about("consistent hash").args([
|
||||
clap::Arg::new("file")
|
||||
.short('f')
|
||||
.long("file")
|
||||
.required(true)
|
||||
.num_args(1..)
|
||||
.help("file"),
|
||||
]),
|
||||
clap::Command::new("upgrade-db")
|
||||
.about("upgrade db table schemas").args(dataArgs()),
|
||||
])
|
||||
@@ -495,6 +503,14 @@ pub async fn cli() -> Result<bool, anyhow::Error> {
|
||||
let td = t.format("%Y-%m-%dT%H:%M:%SZ").to_string();
|
||||
println!("datetimes: {}", td);
|
||||
}
|
||||
"consistent-hash" => {
|
||||
let files = command
|
||||
.get_many::<String>("file")
|
||||
.unwrap()
|
||||
.collect::<Vec<_>>();
|
||||
let files = files.iter().map(|f| f.to_string()).collect::<Vec<_>>();
|
||||
super::http::consistent_hash(files).await?;
|
||||
}
|
||||
"upgrade-db" => {
|
||||
crate::migration::init_db().await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user