connstr logic
This commit is contained in:
parent
af07152a81
commit
822324987d
@ -21,7 +21,7 @@ func main() {
|
|||||||
flag.StringVar(&connStr, "c", "", "connection string")
|
flag.StringVar(&connStr, "c", "", "connection string")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if connStr != "" {
|
if connStr == "" {
|
||||||
connStr = config.DbConn()
|
connStr = config.DbConn()
|
||||||
}
|
}
|
||||||
connData, err := storage.ToConnData(connStr)
|
connData, err := storage.ToConnData(connStr)
|
||||||
|
@ -92,7 +92,7 @@ func(n *NatsSubscription) Close() error {
|
|||||||
func(n *NatsSubscription) handleEvent(m jetstream.Msg) {
|
func(n *NatsSubscription) handleEvent(m jetstream.Msg) {
|
||||||
var ev geEvent.Event
|
var ev geEvent.Event
|
||||||
|
|
||||||
logg.DebugCtxf(n.ctx, "have msg", "err", m)
|
logg.DebugCtxf(n.ctx, "have msg", "msg", m)
|
||||||
b := m.Data()
|
b := m.Data()
|
||||||
err := json.Unmarshal(b, &ev)
|
err := json.Unmarshal(b, &ev)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user