This commit is contained in:
@@ -15,10 +15,11 @@ func main() {
|
||||
}
|
||||
|
||||
cnf := app.NewConfig("catalog-scheduler")
|
||||
a := app.NewApp(app.NewScheduler(cnf))
|
||||
a.RegisterPlugin(app.CachePlugin(cnf))
|
||||
a.RegisterPlugin(app.DatabasePlugin(cnf))
|
||||
a.RegisterPlugin(app.EventbusPlugin(cnf))
|
||||
srv := app.NewScheduler(cnf)
|
||||
a := app.NewApp(srv)
|
||||
a.RegisterPlugin(app.CachePlugin(cnf, srv))
|
||||
a.RegisterPlugin(app.DatabasePlugin(cnf, srv))
|
||||
a.RegisterPlugin(app.EventbusPlugin(cnf, srv))
|
||||
|
||||
while := make(chan struct{})
|
||||
err := a.Start(while)
|
||||
|
||||
@@ -15,10 +15,11 @@ func main() {
|
||||
}
|
||||
|
||||
cnf := app.NewConfig("catalog-worker")
|
||||
a := app.NewApp(app.NewWorker(cnf))
|
||||
a.RegisterPlugin(app.CachePlugin(cnf))
|
||||
a.RegisterPlugin(app.DatabasePlugin(cnf))
|
||||
a.RegisterPlugin(app.EventbusPlugin(cnf))
|
||||
srv := app.NewWorker(cnf)
|
||||
a := app.NewApp(srv)
|
||||
a.RegisterPlugin(app.CachePlugin(cnf, srv))
|
||||
a.RegisterPlugin(app.DatabasePlugin(cnf, srv))
|
||||
a.RegisterPlugin(app.EventbusPlugin(cnf, srv))
|
||||
|
||||
while := make(chan struct{})
|
||||
err := a.Start(while)
|
||||
|
||||
Reference in New Issue
Block a user