mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
fix(server): init event notifier when partial notify configured (#2125)
This commit is contained in:
@@ -62,14 +62,15 @@ pub(crate) async fn init_event_notifier() {
|
|||||||
target: "rustfs::main::init_event_notifier",
|
target: "rustfs::main::init_event_notifier",
|
||||||
"Global server configuration loaded successfully"
|
"Global server configuration loaded successfully"
|
||||||
);
|
);
|
||||||
// 2. Check if the notify subsystem exists in the configuration, and skip initialization if it doesn't
|
// 2. Check if at least one notify subsystem exists in the configuration, and skip only when neither is present.
|
||||||
if server_config
|
let mqtt_configured = server_config
|
||||||
.get_value(rustfs_config::notify::NOTIFY_MQTT_SUB_SYS, DEFAULT_DELIMITER)
|
.get_value(rustfs_config::notify::NOTIFY_MQTT_SUB_SYS, DEFAULT_DELIMITER)
|
||||||
.is_none()
|
.is_some();
|
||||||
|| server_config
|
let webhook_configured = server_config
|
||||||
.get_value(rustfs_config::notify::NOTIFY_WEBHOOK_SUB_SYS, DEFAULT_DELIMITER)
|
.get_value(rustfs_config::notify::NOTIFY_WEBHOOK_SUB_SYS, DEFAULT_DELIMITER)
|
||||||
.is_none()
|
.is_some();
|
||||||
{
|
|
||||||
|
if !mqtt_configured && !webhook_configured {
|
||||||
info!(
|
info!(
|
||||||
target: "rustfs::main::init_event_notifier",
|
target: "rustfs::main::init_event_notifier",
|
||||||
"'notify' subsystem not configured, skipping event notifier initialization."
|
"'notify' subsystem not configured, skipping event notifier initialization."
|
||||||
|
|||||||
Reference in New Issue
Block a user