App don't know about units
This commit is contained in:
parent
231d1c6041
commit
655deb617f
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue