diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-12-06 00:37:59 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-12-06 00:37:59 -0800 |
| commit | ffa2827ab162b37b75349dda7e73bf873ae1fdca (patch) | |
| tree | f41c92d7aa380561bb7677ff642706c61b58c251 /weed/command/filer_replication.go | |
| parent | 63619f8b8e837156d2b486f08f538eabd23f687c (diff) | |
| download | seaweedfs-ffa2827ab162b37b75349dda7e73bf873ae1fdca.tar.xz seaweedfs-ffa2827ab162b37b75349dda7e73bf873ae1fdca.zip | |
fail fast if two notification queues or inputs are enabled
Diffstat (limited to 'weed/command/filer_replication.go')
| -rw-r--r-- | weed/command/filer_replication.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weed/command/filer_replication.go b/weed/command/filer_replication.go index 4ceb5ce4c..087a12059 100644 --- a/weed/command/filer_replication.go +++ b/weed/command/filer_replication.go @@ -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()) |
