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{
|
return &Bank{
|
||||||
config: config,
|
config: chainsConfig,
|
||||||
chains: map[string]*Chain{},
|
chains: map[string]*Chain{},
|
||||||
units: units,
|
units: unit.NewBank(unitsConfig),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/localhots/yeast/chain"
|
"github.com/localhots/yeast/chain"
|
||||||
"github.com/localhots/yeast/unit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
@ -23,10 +22,9 @@ func NewApp() *App {
|
||||||
conf := &Config{}
|
conf := &Config{}
|
||||||
conf.Init()
|
conf.Init()
|
||||||
|
|
||||||
ub := unit.NewBank(conf.C().UnitsConfig)
|
|
||||||
a := &App{
|
a := &App{
|
||||||
config: conf,
|
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),
|
sv: NewSupervisor(conf.C().Python.BinPath, conf.C().Python.WrapperPath),
|
||||||
}
|
}
|
||||||
a.chains.Reload()
|
a.chains.Reload()
|
||||||
|
|
Loading…
Reference in New Issue