+3
-1
cmd/monarch/cursors.go
+3
-1
cmd/monarch/cursors.go
···
4
4
"context"
5
5
"fmt"
6
6
"log/slog"
7
+
"strconv"
7
8
"sync"
8
9
"time"
9
10
···
67
68
68
69
func (cs *CursorService) Flush() error {
69
70
cs.firehoseLk.Lock()
70
-
if err := cs.store.Model(&cursorRecord{}).Where("key = ?", "firehose").Update("val", cs.firehoseSeq).Error; err != nil {
71
+
fcursor := strconv.Itoa(int(cs.firehoseSeq))
72
+
if err := cs.store.Model(&cursorRecord{}).Where("key = ?", "firehose").Update("val", fcursor).Error; err != nil {
71
73
return fmt.Errorf("error updating cursor record: %w", err)
72
74
}
73
75
cs.firehoseLk.Unlock()