Make collab quieter on startup (#8685)
Fix initialization of minio to happen on service start instead of bootstrap, don't log errors if extensions are empty or if clickhouse is disabled Release Notes: - N/A
This commit is contained in:
parent
64460e492a
commit
400fb12f7e
5 changed files with 38 additions and 35 deletions
|
@ -147,9 +147,7 @@ async fn fetch_extensions_from_blob_store(
|
|||
.send()
|
||||
.await?;
|
||||
|
||||
let objects = list
|
||||
.contents
|
||||
.ok_or_else(|| anyhow!("missing bucket contents"))?;
|
||||
let objects = list.contents.unwrap_or_default();
|
||||
|
||||
let mut published_versions = HashMap::<&str, Vec<&str>>::default();
|
||||
for object in &objects {
|
||||
|
|
|
@ -176,7 +176,7 @@ impl AppState {
|
|||
db: Arc::new(db),
|
||||
live_kit_client,
|
||||
blob_store_client: build_blob_store_client(&config).await.log_err(),
|
||||
clickhouse_client: build_clickhouse_client(&config).log_err(),
|
||||
clickhouse_client: build_clickhouse_client(&config),
|
||||
config,
|
||||
};
|
||||
Ok(Arc::new(this))
|
||||
|
@ -218,30 +218,30 @@ async fn build_blob_store_client(config: &Config) -> anyhow::Result<aws_sdk_s3::
|
|||
Ok(aws_sdk_s3::Client::new(&s3_config))
|
||||
}
|
||||
|
||||
fn build_clickhouse_client(config: &Config) -> anyhow::Result<clickhouse::Client> {
|
||||
Ok(clickhouse::Client::default()
|
||||
.with_url(
|
||||
config
|
||||
.clickhouse_url
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow!("missing clickhouse_url"))?,
|
||||
)
|
||||
.with_user(
|
||||
config
|
||||
.clickhouse_user
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow!("missing clickhouse_user"))?,
|
||||
)
|
||||
.with_password(
|
||||
config
|
||||
.clickhouse_password
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow!("missing clickhouse_password"))?,
|
||||
)
|
||||
.with_database(
|
||||
config
|
||||
.clickhouse_database
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow!("missing clickhouse_database"))?,
|
||||
))
|
||||
fn build_clickhouse_client(config: &Config) -> Option<clickhouse::Client> {
|
||||
let Some(url) = config.clickhouse_url.as_ref() else {
|
||||
return None;
|
||||
};
|
||||
Some(
|
||||
clickhouse::Client::default()
|
||||
.with_url(url)
|
||||
.with_user(
|
||||
config
|
||||
.clickhouse_user
|
||||
.as_ref()
|
||||
.expect("missing clickhouse_user"),
|
||||
)
|
||||
.with_password(
|
||||
config
|
||||
.clickhouse_password
|
||||
.as_ref()
|
||||
.expect("missing clickhouse_password"),
|
||||
)
|
||||
.with_database(
|
||||
config
|
||||
.clickhouse_database
|
||||
.as_ref()
|
||||
.expect("missing clickhouse_database"),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue