connstr logic

This commit is contained in:
lash 2025-01-13 08:15:45 +00:00
parent af07152a81
commit 822324987d
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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 {