mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
improve code
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ pub(crate) async fn init_event_notifier(notifier_config: Option<String>) {
|
||||
NotifierConfig::event_load_config(notifier_config)
|
||||
} else {
|
||||
info!("event_config is empty");
|
||||
rustfs_event::get_event_notifier_config().clone()
|
||||
// rustfs_event::get_event_notifier_config().clone()
|
||||
};
|
||||
|
||||
info!("using event_config: {:?}", config);
|
||||
|
||||
+1
-2
@@ -48,7 +48,6 @@ use iam::init_iam_sys;
|
||||
use license::init_license;
|
||||
use protos::proto_gen::node_service::node_service_server::NodeServiceServer;
|
||||
use rustfs_config::{DEFAULT_ACCESS_KEY, DEFAULT_SECRET_KEY, RUSTFS_TLS_CERT, RUSTFS_TLS_KEY};
|
||||
use rustfs_event::GLOBAL_EventSys;
|
||||
use rustfs_obs::{init_obs, set_global_guard, SystemObserver};
|
||||
use rustls::ServerConfig;
|
||||
use s3s::{host::MultiDomain, service::S3ServiceBuilder};
|
||||
@@ -511,7 +510,7 @@ async fn run(opt: config::Opt) -> Result<()> {
|
||||
GLOBAL_ConfigSys.init(store.clone()).await?;
|
||||
|
||||
// event system configuration
|
||||
GLOBAL_EventSys.init(store.clone()).await?;
|
||||
// GLOBAL_EventSys.init(store.clone()).await?;
|
||||
|
||||
// Initialize event notifier
|
||||
event::init_event_notifier(opt.event_config).await;
|
||||
|
||||
@@ -26,9 +26,6 @@ pub async fn authorize_request<T>(req: &mut S3Request<T>, action: Action) -> S3R
|
||||
|
||||
if let Some(cred) = &req_info.cred {
|
||||
let Ok(iam_store) = iam::get() else {
|
||||
let _api_rejected_auth_total_key = rustfs_obs::API_REJECTED_AUTH_TOTAL_MD.get_full_metric_name();
|
||||
let desc = rustfs_obs::API_REJECTED_AUTH_TOTAL_MD.clone().help;
|
||||
tracing::info!(api_rejected_auth_total_key = 1_u64, desc);
|
||||
return Err(S3Error::with_message(
|
||||
S3ErrorCode::InternalError,
|
||||
format!("authorize_request {:?}", IamError::IamSysNotInitialized),
|
||||
|
||||
Reference in New Issue
Block a user