an app.bsky.* indexer

do one final firehose persist on exit

Changed files
+6 -1
cmd
monarch
+6 -1
cmd/monarch/cursors.go
··· 33 33 select { 34 34 case <-ctx.Done(): 35 35 slog.Info("stopping cursor checkpointer", "err", ctx.Err()) 36 + 37 + slog.Info("persisting firehose cursor before exit", "seq", cs.firehoseSeq) 38 + if err := cs.PersistFirehoseCursor(); err != nil { 39 + slog.Error("error persisting firehose cursor", "err", err) 40 + } 41 + 36 42 return 37 43 case <-t.C: 38 44 } ··· 40 46 slog.Info("persisting firehose cursor", "seq", cs.firehoseSeq) 41 47 if err := cs.PersistFirehoseCursor(); err != nil { 42 48 slog.Error("error persisting firehose cursor", "err", err) 43 - return 44 49 } 45 50 } 46 51 }