Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee

fix: populate feed from persisted state on startup

pdewey.com 0c6f5fb3 67c2526d

verified
+7
+7
internal/firehose/index.go
··· 241 241 profileCache: make(map[string]*CachedProfile), 242 242 } 243 243 244 + // If the database already has records from a previous run, mark ready immediately 245 + // so the feed is served from persisted data while the firehose reconnects. 246 + var count int 247 + if err := db.QueryRow(`SELECT COUNT(*) FROM records`).Scan(&count); err == nil && count > 0 { 248 + idx.ready = true 249 + } 250 + 244 251 return idx, nil 245 252 } 246 253