|
@@ -26,17 +26,14 @@ type TempAlarmNode struct {
|
|
|
|
|
|
func (t *TempAlarmNode) Init(ctx ruleEngine.Context, config string) error {
|
|
func (t *TempAlarmNode) Init(ctx ruleEngine.Context, config string) error {
|
|
t.pool = grpool.New(10)
|
|
t.pool = grpool.New(10)
|
|
- fmt.Printf("initConfig:---------------------------%s\r\n", config)
|
|
|
|
if config == "" {
|
|
if config == "" {
|
|
t.config = &TempAlarmNodeConfig{}
|
|
t.config = &TempAlarmNodeConfig{}
|
|
} else {
|
|
} else {
|
|
c := new(TempAlarmNodeConfig)
|
|
c := new(TempAlarmNodeConfig)
|
|
err := json.Unmarshal([]byte(config), c)
|
|
err := json.Unmarshal([]byte(config), c)
|
|
if err != nil {
|
|
if err != nil {
|
|
- fmt.Printf("config转换失败:----------------%s", err.Error())
|
|
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
- fmt.Printf("config转换c:----------------%s", gjson.New(c).MustToJsonString())
|
|
|
|
t.config = c
|
|
t.config = c
|
|
}
|
|
}
|
|
client := utils.NewHttpClient()
|
|
client := utils.NewHttpClient()
|