1
This commit is contained in:
parent
ff9247b980
commit
72df840b09
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"f5"
|
"f5"
|
||||||
"main/mt"
|
"main/mt"
|
||||||
|
"main/constant"
|
||||||
)
|
)
|
||||||
|
|
||||||
type app struct {
|
type app struct {
|
||||||
@ -38,6 +39,14 @@ func (this *app) Update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *app) registerDataSources() {
|
func (this *app) registerDataSources() {
|
||||||
|
f5.GetApp().RegisterOrmDb(
|
||||||
|
constant.WHEEL_DB,
|
||||||
|
mt.Table.WheelDb.GetById(0).GetHost(),
|
||||||
|
mt.Table.WheelDb.GetById(0).GetPort(),
|
||||||
|
mt.Table.WheelDb.GetById(0).GetUser(),
|
||||||
|
mt.Table.WheelDb.GetById(0).GetPasswd(),
|
||||||
|
mt.Table.WheelDb.GetById(0).GetDatabase(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *app) HasTask() bool {
|
func (this *app) HasTask() bool {
|
||||||
|
@ -8,7 +8,7 @@ type table struct {
|
|||||||
WheelServerCluster *WheelServerClusterTable
|
WheelServerCluster *WheelServerClusterTable
|
||||||
Config *ConfigTable
|
Config *ConfigTable
|
||||||
Web3ServiceCluster *Web3ServiceClusterTable
|
Web3ServiceCluster *Web3ServiceClusterTable
|
||||||
WheelDbCluster *WheelDbTable
|
WheelDb *WheelDbTable
|
||||||
}
|
}
|
||||||
|
|
||||||
var Table = f5.New(func(this *table) {
|
var Table = f5.New(func(this *table) {
|
||||||
@ -27,7 +27,7 @@ var Table = f5.New(func(this *table) {
|
|||||||
this.PrimKey = ""
|
this.PrimKey = ""
|
||||||
})
|
})
|
||||||
|
|
||||||
this.WheelDbCluster = f5.New(func(this *WheelDbTable) {
|
this.WheelDb = f5.New(func(this *WheelDbTable) {
|
||||||
this.FileName = "../config/wheeldb.json"
|
this.FileName = "../config/wheeldb.json"
|
||||||
this.PrimKey = ""
|
this.PrimKey = ""
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user