From 2c72ebec4f4717b66cd99f865e7a35f90501e834 Mon Sep 17 00:00:00 2001 From: wangjian Date: Wed, 5 Apr 2023 17:42:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mq.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mq.go b/mq.go index 5a70799..00b2076 100644 --- a/mq.go +++ b/mq.go @@ -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 }