diff --git a/crates/event-notifier/examples/.env-zh.example b/crates/event-notifier/examples/.env-zh.example index dffa9c6e..00228e16 100644 --- a/crates/event-notifier/examples/.env-zh.example +++ b/crates/event-notifier/examples/.env-zh.example @@ -5,7 +5,7 @@ NOTIFIER__CHANNEL_CAPACITY=5000 # ===== 适配器配置(数组格式) ===== # Webhook 适配器(索引 0) NOTIFIER__ADAPTERS_0__type=Webhook -NOTIFIER__ADAPTERS_0__endpoint=http://127.0.0.1:3000/webhook +NOTIFIER__ADAPTERS_0__endpoint=http://127.0.0.1:3020/webhook NOTIFIER__ADAPTERS_0__auth_token=your-auth-token NOTIFIER__ADAPTERS_0__max_retries=3 NOTIFIER__ADAPTERS_0__timeout=50 diff --git a/crates/event-notifier/examples/.env.example b/crates/event-notifier/examples/.env.example index 28b4fcf4..af343863 100644 --- a/crates/event-notifier/examples/.env.example +++ b/crates/event-notifier/examples/.env.example @@ -5,7 +5,7 @@ NOTIFIER__CHANNEL_CAPACITY=5000 # ===== adapter configuration array format ===== # webhook adapter index 0 NOTIFIER__ADAPTERS_0__type=Webhook -NOTIFIER__ADAPTERS_0__endpoint=http://127.0.0.1:3000/webhook +NOTIFIER__ADAPTERS_0__endpoint=http://127.0.0.1:3020/webhook NOTIFIER__ADAPTERS_0__auth_token=your-auth-token NOTIFIER__ADAPTERS_0__max_retries=3 NOTIFIER__ADAPTERS_0__timeout=50 diff --git a/crates/event-notifier/examples/event.toml b/crates/event-notifier/examples/event.toml index de5293f2..5b4292fa 100644 --- a/crates/event-notifier/examples/event.toml +++ b/crates/event-notifier/examples/event.toml @@ -4,7 +4,7 @@ channel_capacity = 5000 [[adapters]] type = "Webhook" -endpoint = "http://127.0.0.1:3000/webhook" +endpoint = "http://127.0.0.1:3020/webhook" auth_token = "your-auth-token" max_retries = 3 timeout = 50 diff --git a/crates/event-notifier/examples/webhook.rs b/crates/event-notifier/examples/webhook.rs index 5363e574..c754f822 100644 --- a/crates/event-notifier/examples/webhook.rs +++ b/crates/event-notifier/examples/webhook.rs @@ -7,8 +7,8 @@ async fn main() { // 构建应用 let app = Router::new().route("/webhook", post(receive_webhook)); // 启动服务器 - let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); - println!("Server running on http://0.0.0.0:3000"); + let listener = tokio::net::TcpListener::bind("0.0.0.0:3020").await.unwrap(); + println!("Server running on http://0.0.0.0:3020"); // 创建关闭信号处理 tokio::select! { diff --git a/crates/event-notifier/src/global.rs b/crates/event-notifier/src/global.rs index 9a83e9c7..25fadeeb 100644 --- a/crates/event-notifier/src/global.rs +++ b/crates/event-notifier/src/global.rs @@ -178,9 +178,9 @@ mod tests { tracing_subscriber::fmt::init(); let config = NotifierConfig::default(); // assume there is a default configuration let result = initialize(config).await; - assert!(!result.is_ok(), "Initialization should succeed"); - assert!(!is_initialized(), "System should be marked as initialized"); - assert!(!is_ready(), "System should be marked as ready"); + assert!(result.is_err(), "Initialization should not succeed"); + assert!(!is_initialized(), "System should not be marked as initialized"); + assert!(!is_ready(), "System should not be marked as ready"); } #[tokio::test] diff --git a/deploy/config/event.example.toml b/deploy/config/event.example.toml index 809fe581..6deb67a2 100644 --- a/deploy/config/event.example.toml +++ b/deploy/config/event.example.toml @@ -4,7 +4,7 @@ channel_capacity = 5000 [[adapters]] type = "Webhook" -endpoint = "http://127.0.0.1:3000/webhook" +endpoint = "http://127.0.0.1:3020/webhook" auth_token = "your-auth-token" max_retries = 3 timeout = 50 diff --git a/deploy/config/obs.example.toml b/deploy/config/obs.example.toml index a3c3d096..97192fb4 100644 --- a/deploy/config/obs.example.toml +++ b/deploy/config/obs.example.toml @@ -6,7 +6,7 @@ meter_interval = 30 service_name = "rustfs" service_version = "0.1.0" environment = "develop" -logger_level = "info" +logger_level = "error" [sinks] [sinks.kafka] # Kafka sink is disabled by default