mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix
This commit is contained in:
@@ -7,7 +7,6 @@ use crate::{Event, DEFAULT_RETRY_INTERVAL};
|
|||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use reqwest::header::{HeaderMap, HeaderName, HeaderValue};
|
use reqwest::header::{HeaderMap, HeaderName, HeaderValue};
|
||||||
use reqwest::{self, Client, Identity, RequestBuilder};
|
use reqwest::{self, Client, Identity, RequestBuilder};
|
||||||
use serde_json::to_string;
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
+4
-5
@@ -1,6 +1,5 @@
|
|||||||
use rustfs_config::NotifierConfig;
|
use rustfs_notify::EventNotifierConfig;
|
||||||
use rustfs_event::EventNotifierConfig;
|
use tracing::{info, instrument};
|
||||||
use tracing::{error, info, instrument};
|
|
||||||
|
|
||||||
#[instrument]
|
#[instrument]
|
||||||
pub(crate) async fn init_event_notifier(notifier_config: Option<String>) {
|
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)
|
EventNotifierConfig::event_load_config(notifier_config)
|
||||||
} else {
|
} else {
|
||||||
info!("event_config is empty");
|
info!("event_config is empty");
|
||||||
// rustfs_event::get_event_notifier_config().clone()
|
// rustfs_notify::get_event_notifier_config().clone()
|
||||||
EventNotifierConfig::default()
|
EventNotifierConfig::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
info!("using event_config: {:?}", config);
|
info!("using event_config: {:?}", config);
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
// let result = rustfs_event::initialize(&config).await;
|
// let result = rustfs_notify::initialize(&config).await;
|
||||||
// match result {
|
// match result {
|
||||||
// Ok(_) => info!(
|
// Ok(_) => info!(
|
||||||
// "event notifier initialized successfully {}",
|
// "event notifier initialized successfully {}",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use rustfs_event::{Event, Metadata};
|
use rustfs_notify::{Event, Metadata};
|
||||||
|
|
||||||
/// Create a new metadata object
|
/// Create a new metadata object
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@@ -13,6 +13,6 @@ pub(crate) fn create_metadata() -> Metadata {
|
|||||||
/// Create a new event object
|
/// Create a new event object
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub(crate) async fn send_event(event: Event) -> Result<(), Box<dyn std::error::Error>> {
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user