mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 01:23:36 +08:00
fail fast if two notification queues or inputs are enabled
This commit is contained in:
@@ -41,6 +41,17 @@ func runFilerReplicate(cmd *Command, args []string) bool {
|
||||
|
||||
var notificationInput sub.NotificationInput
|
||||
|
||||
enabledInput := ""
|
||||
for _, input := range sub.NotificationInputs {
|
||||
if config.GetBool("notification." + input.GetName() + ".enabled") {
|
||||
if enabledInput == "" {
|
||||
enabledInput = input.GetName()
|
||||
} else {
|
||||
glog.Fatalf("Notification input is enabled for both %s and %s", enabledInput, input.GetName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, input := range sub.NotificationInputs {
|
||||
if config.GetBool("notification." + input.GetName() + ".enabled") {
|
||||
viperSub := config.Sub("notification." + input.GetName())
|
||||
|
Reference in New Issue
Block a user