mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
[REV] update discover eventlog server config
This commit is contained in:
parent
c295b48e3b
commit
e52785a300
@ -77,7 +77,10 @@ func CreateEventManager(conf option.Config) error {
|
||||
var err error
|
||||
for tryTime < 4 {
|
||||
tryTime++
|
||||
if err = event.NewManager(event.EventConfig{EventLogServers: conf.EventLogServers}); err != nil {
|
||||
if err = event.NewManager(event.EventConfig{
|
||||
EventLogServers: conf.EventLogServers,
|
||||
DiscoverAddress: conf.EtcdEndpoint,
|
||||
}); err != nil {
|
||||
logrus.Errorf("get event manager failed, try time is %v,%s", tryTime, err.Error())
|
||||
time.Sleep((5 + tryTime*10) * time.Second)
|
||||
} else {
|
||||
|
@ -24,13 +24,13 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/goodrain/rainbond/cmd/api/option"
|
||||
"github.com/goodrain/rainbond/api/controller"
|
||||
"github.com/goodrain/rainbond/api/db"
|
||||
"github.com/goodrain/rainbond/api/discover"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/server"
|
||||
"github.com/goodrain/rainbond/appruntimesync/client"
|
||||
"github.com/goodrain/rainbond/cmd/api/option"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
@ -53,7 +53,10 @@ func Run(s *option.APIServer) error {
|
||||
logrus.Debugf("create event manager error, %v", err)
|
||||
}
|
||||
|
||||
if err := event.NewManager(event.EventConfig{EventLogServers: s.Config.EventLogServers}); err != nil {
|
||||
if err := event.NewManager(event.EventConfig{
|
||||
EventLogServers: s.Config.EventLogServers,
|
||||
DiscoverAddress: s.Config.EtcdEndpoint,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
defer event.CloseManager()
|
||||
|
@ -23,9 +23,9 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/goodrain/rainbond/cmd/builder/option"
|
||||
"github.com/goodrain/rainbond/builder/discover"
|
||||
"github.com/goodrain/rainbond/builder/exector"
|
||||
"github.com/goodrain/rainbond/cmd/builder/option"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/db/config"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
@ -49,7 +49,10 @@ func Run(s *option.Builder) error {
|
||||
if err := db.CreateManager(dbconfig); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := event.NewManager(event.EventConfig{EventLogServers: s.Config.EventLogServers}); err != nil {
|
||||
if err := event.NewManager(event.EventConfig{
|
||||
EventLogServers: s.Config.EventLogServers,
|
||||
DiscoverAddress: s.Config.EtcdEndPoints,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
defer event.CloseManager()
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/goodrain/rainbond/cmd/worker/option"
|
||||
"github.com/goodrain/rainbond/appruntimesync"
|
||||
"github.com/goodrain/rainbond/appruntimesync/client"
|
||||
"github.com/goodrain/rainbond/cmd/worker/option"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/db/config"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
@ -56,7 +56,10 @@ func Run(s *option.Worker) error {
|
||||
}
|
||||
defer db.CloseManager()
|
||||
|
||||
if err := event.NewManager(event.EventConfig{EventLogServers: s.Config.EventLogServers}); err != nil {
|
||||
if err := event.NewManager(event.EventConfig{
|
||||
EventLogServers: s.Config.EventLogServers,
|
||||
DiscoverAddress: s.Config.EtcdEndPoints,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
defer event.CloseManager()
|
||||
|
Loading…
Reference in New Issue
Block a user