an app.bsky.* indexer

convert firehose seq to string

Changed files
+3 -1
cmd
monarch
+3 -1
cmd/monarch/cursors.go
···
"context"
"fmt"
"log/slog"
+
"strconv"
"sync"
"time"
···
func (cs *CursorService) Flush() error {
cs.firehoseLk.Lock()
-
if err := cs.store.Model(&cursorRecord{}).Where("key = ?", "firehose").Update("val", cs.firehoseSeq).Error; err != nil {
+
fcursor := strconv.Itoa(int(cs.firehoseSeq))
+
if err := cs.store.Model(&cursorRecord{}).Where("key = ?", "firehose").Update("val", fcursor).Error; err != nil {
return fmt.Errorf("error updating cursor record: %w", err)
}
cs.firehoseLk.Unlock()