1、修改bug

This commit is contained in:
wangjian 2023-04-05 17:42:17 +08:00
parent ff095c2312
commit 2c72ebec4f
1 changed files with 6 additions and 1 deletions

7
mq.go
View File

@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"git.hpds.cc/Component/network/metadata"
"git.hpds.cc/Component/network/router"
"net/http"
"git.hpds.cc/Component/network"
@ -139,7 +140,11 @@ func (z *messageQueue) ConfigWorkflow(conf string) error {
func (z *messageQueue) configWorkflow(config *config.WorkflowConfig) error {
z.wfc = config
z.server.ConfigMetadataBuilder(metadata.DefaultBuilder())
z.server.ConfigRouter(newRouter(config.Functions))
funcList := make([]string, len(config.Functions))
for k, v := range config.Functions {
funcList[k] = v.Name
}
z.server.ConfigRouter(router.Default(funcList))
return nil
}