This commit is contained in:
houseme
2025-06-06 16:11:40 +08:00
parent 77ddd1cfe0
commit 2755d4125d
3 changed files with 6 additions and 8 deletions
-1
View File
@@ -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;
+4 -5
View File
@@ -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<String>) {
@@ -11,13 +10,13 @@ pub(crate) async fn init_event_notifier(notifier_config: Option<String>) {
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 {}",
+2 -2
View File
@@ -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<dyn std::error::Error>> {
// rustfs_event::send_event(event).await.map_err(|e| e.into())
// rustfs_notify::send_event(event).await.map_err(|e| e.into())
Ok(())
}