mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-11 16:09:39 +00:00
nit
This commit is contained in:
@@ -1126,7 +1126,10 @@ pub async fn reload_s3_cache_setting(db: &DB) {
|
||||
if let Err(e) = s3_client {
|
||||
tracing::error!("Error building s3 client from settings: {:?}", e)
|
||||
} else {
|
||||
tracing::info!("Loaded object store {:?}", setting.unwrap().get_bucket());
|
||||
tracing::info!(
|
||||
"Loaded object store {:?}",
|
||||
setting.as_ref().unwrap().get_bucket()
|
||||
);
|
||||
*s3_cache_settings = Some(s3_client.unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,13 +415,10 @@ pub enum ObjectSettings {
|
||||
}
|
||||
|
||||
impl ObjectSettings {
|
||||
pub fn get_bucket(&self) -> &str {
|
||||
pub fn get_bucket(&self) -> Option<&String> {
|
||||
match self {
|
||||
ObjectSettings::S3(s3_settings) => s3_settings
|
||||
.bucket
|
||||
.as_ref()
|
||||
.unwrap_or_else(|| "missingbucket".to_string()),
|
||||
ObjectSettings::Azure(azure_settings) => &azure_settings.container_name,
|
||||
ObjectSettings::S3(s3_settings) => s3_settings.bucket.as_ref(),
|
||||
ObjectSettings::Azure(azure_settings) => Some(&azure_settings.container_name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user