fix: schema not registered
This commit is contained in:
parent
928d69fcaa
commit
f87f3c6599
11
main.go
11
main.go
|
@ -115,12 +115,6 @@ func main() {
|
||||||
api.AddGlobalInterceptors(new(audit_log.MonitoringInterceptor))
|
api.AddGlobalInterceptors(new(audit_log.MonitoringInterceptor))
|
||||||
|
|
||||||
}, func() {
|
}, func() {
|
||||||
|
|
||||||
module.Start()
|
|
||||||
|
|
||||||
var initFunc = func() {
|
|
||||||
elastic2.InitTemplate(false)
|
|
||||||
|
|
||||||
//orm.RegisterSchema(model.Dict{}, "dict")
|
//orm.RegisterSchema(model.Dict{}, "dict")
|
||||||
orm.RegisterSchemaWithIndexName(elastic.View{}, "view")
|
orm.RegisterSchemaWithIndexName(elastic.View{}, "view")
|
||||||
orm.RegisterSchemaWithIndexName(elastic.CommonCommand{}, "commands")
|
orm.RegisterSchemaWithIndexName(elastic.CommonCommand{}, "commands")
|
||||||
|
@ -140,6 +134,11 @@ func main() {
|
||||||
orm.RegisterSchemaWithIndexName(api3.RemoteConfig{}, "configs")
|
orm.RegisterSchemaWithIndexName(api3.RemoteConfig{}, "configs")
|
||||||
orm.RegisterSchemaWithIndexName(model.AuditLog{}, "audit-logs")
|
orm.RegisterSchemaWithIndexName(model.AuditLog{}, "audit-logs")
|
||||||
|
|
||||||
|
module.Start()
|
||||||
|
|
||||||
|
var initFunc = func() {
|
||||||
|
elastic2.InitTemplate(false)
|
||||||
|
|
||||||
if global.Env().SetupRequired() {
|
if global.Env().SetupRequired() {
|
||||||
for _, v := range modules {
|
for _, v := range modules {
|
||||||
v.Value.Start()
|
v.Value.Start()
|
||||||
|
|
Loading…
Reference in New Issue