warn if controller and worker name are the same (#2773)

This commit is contained in:
Irena Rindos authored and GitHub committed 2023-01-11 09:07:31 -05:00
1 parent 5ac590f305
commit af24972386
1 file changed
+6
+6
View File
@@ -208,6 +208,12 @@ func (c *Command) Run(args []string) int {
return base.CommandUserError
}
}
if c.Config.Controller != nil {
if c.Config.Worker.Name == c.Config.Controller.Name {
c.UI.Error("Controller and worker cannot be configured with the same name.")
return base.CommandUserError
}
}
}
if c.Config.DefaultMaxRequestDuration != 0 {