mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-27 16:48:58 +00:00
fix
This commit is contained in:
@@ -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
@@ -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 {}",
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user