1
0
Fork 0

App don't know about units

This commit is contained in:
Gregory Eremin 2015-02-12 03:09:35 +07:00
parent 231d1c6041
commit 655deb617f
2 changed files with 4 additions and 6 deletions

View File

@ -18,11 +18,11 @@ type (
}
)
func NewBank(config string, units *unit.Bank) *Bank {
func NewBank(chainsConfig, unitsConfig string) *Bank {
return &Bank{
config: config,
config: chainsConfig,
chains: map[string]*Chain{},
units: units,
units: unit.NewBank(unitsConfig),
}
}

View File

@ -8,7 +8,6 @@ import (
"syscall"
"github.com/localhots/yeast/chain"
"github.com/localhots/yeast/unit"
)
type (
@ -23,10 +22,9 @@ func NewApp() *App {
conf := &Config{}
conf.Init()
ub := unit.NewBank(conf.C().UnitsConfig)
a := &App{
config: conf,
chains: chain.NewBank(conf.C().ChainsConfig, ub),
chains: chain.NewBank(conf.C().ChainsConfig, conf.C().UnitsConfig),
sv: NewSupervisor(conf.C().Python.BinPath, conf.C().Python.WrapperPath),
}
a.chains.Reload()