forked from tangled.org/core
this repo has no description

knotclient: use unix nanos in event consumer

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li a8a3163d 2bb4ab2b

verified
Changed files
+2 -2
knotclient
knotserver
+1 -1
knotclient/events.go
···
}
// update cursor
-
c.cfg.CursorStore.Set(j.source.Knot, time.Now().Unix())
+
c.cfg.CursorStore.Set(j.source.Knot, time.Now().UnixNano())
if err := c.cfg.ProcessFunc(ctx, j.source, msg); err != nil {
c.logger.Error("error processing message", "source", j.source, "err", err)
+1 -1
knotserver/events.go
···
}
// complete backfill first before going to live data
-
l.Info("going through backfill", "cursor", cursor)
l.Debug("going through backfill", "cursor", cursor)
if err := h.streamOps(conn, &cursor); err != nil {
l.Error("failed to backfill", "err", err)
return
}
+
for {
// wait for new data or timeout
select {