Skip to content

Commit

Permalink
Improved redis plug-in configuration check
Browse files Browse the repository at this point in the history
Signed-off-by: hedengfeng <894220128@qq.com>
  • Loading branch information
feng-crazy authored and 何登锋 committed Jul 28, 2021
1 parent b6d061f commit 6ade70b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extensions/sinks/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func (r *RedisSink) Configure(props map[string]interface{}) error {
if i, ok := i.(string); ok {
r.key = i
}
} else {
return errors.New("not config data key for redis")
}

if i, ok := props["field"]; ok {
Expand Down Expand Up @@ -187,9 +189,6 @@ func (r *RedisSink) Collect(ctx api.StreamContext, data interface{}) error {
}
logger.Debugf("send redis string success, key:%s data: %s", r.key, string(v))
}

} else {
logger.Debug("not config data key for redis")
}

logger.Debug("insert success", string(v))
Expand Down

0 comments on commit 6ade70b

Please sign in to comment.