an app.bsky.* indexer

use SetReposCursor, log cursor flush

Changed files
+2 -4
cmd
+1 -4
cmd/monarch/census.go
···
}
if res.Cursor != nil && *res.Cursor != "" {
-
cs.cursor.reposLk.Lock()
-
curs = *res.Cursor
-
cs.cursor.reposSeq = curs
-
cs.cursor.reposLk.Unlock()
} else {
break
}
···
}
if res.Cursor != nil && *res.Cursor != "" {
+
cs.cursor.SetReposCursor(*res.Cursor)
} else {
break
}
+1
cmd/monarch/cursors.go
···
case <-t.C:
}
if err := cs.Flush(); err != nil {
slog.Error("error flushing cursors", "err", err)
return
···
case <-t.C:
}
+
slog.Info("flushing cursors", "firehose", cs.firehoseSeq, "repos", cs.reposSeq)
if err := cs.Flush(); err != nil {
slog.Error("error flushing cursors", "err", err)
return