From 2755d4125d4af34f7b60d0ef0ee0fab81371f7b8 Mon Sep 17 00:00:00 2001 From: houseme Date: Fri, 6 Jun 2025 16:11:40 +0800 Subject: [PATCH] fix --- crates/notify/src/adapter/webhook.rs | 1 - rustfs/src/event.rs | 9 ++++----- rustfs/src/storage/event.rs | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/notify/src/adapter/webhook.rs b/crates/notify/src/adapter/webhook.rs index 93a703e38..2019996e2 100644 --- a/crates/notify/src/adapter/webhook.rs +++ b/crates/notify/src/adapter/webhook.rs @@ -7,7 +7,6 @@ use crate::{Event, DEFAULT_RETRY_INTERVAL}; use async_trait::async_trait; use reqwest::header::{HeaderMap, HeaderName, HeaderValue}; use reqwest::{self, Client, Identity, RequestBuilder}; -use serde_json::to_string; use std::fs; use std::path::PathBuf; use std::sync::Arc; diff --git a/rustfs/src/event.rs b/rustfs/src/event.rs index 7c47f1017..bc04f7fdb 100644 --- a/rustfs/src/event.rs +++ b/rustfs/src/event.rs @@ -1,6 +1,5 @@ -use rustfs_config::NotifierConfig; -use rustfs_event::EventNotifierConfig; -use tracing::{error, info, instrument}; +use rustfs_notify::EventNotifierConfig; +use tracing::{info, instrument}; #[instrument] pub(crate) async fn init_event_notifier(notifier_config: Option) { @@ -11,13 +10,13 @@ pub(crate) async fn init_event_notifier(notifier_config: Option) { EventNotifierConfig::event_load_config(notifier_config) } else { info!("event_config is empty"); - // rustfs_event::get_event_notifier_config().clone() + // rustfs_notify::get_event_notifier_config().clone() EventNotifierConfig::default() }; info!("using event_config: {:?}", config); tokio::spawn(async move { - // let result = rustfs_event::initialize(&config).await; + // let result = rustfs_notify::initialize(&config).await; // match result { // Ok(_) => info!( // "event notifier initialized successfully {}", diff --git a/rustfs/src/storage/event.rs b/rustfs/src/storage/event.rs index 5fc5bef01..57825e71b 100644 --- a/rustfs/src/storage/event.rs +++ b/rustfs/src/storage/event.rs @@ -1,4 +1,4 @@ -use rustfs_event::{Event, Metadata}; +use rustfs_notify::{Event, Metadata}; /// Create a new metadata object #[allow(dead_code)] @@ -13,6 +13,6 @@ pub(crate) fn create_metadata() -> Metadata { /// Create a new event object #[allow(dead_code)] pub(crate) async fn send_event(event: Event) -> Result<(), Box> { - // rustfs_event::send_event(event).await.map_err(|e| e.into()) + // rustfs_notify::send_event(event).await.map_err(|e| e.into()) Ok(()) }