Add production hardening: health check, streamer panic fix, db maintenance
- Add health check endpoint at /.well-known/healthcheck.json that verifies database and RIS Live connectivity, returns 200/503 - Fix panic in streamer when encountering unknown RIS message types by logging a warning and continuing instead of crashing - Add DBMaintainer for periodic database maintenance: - VACUUM every 6 hours to reclaim space - ANALYZE every hour to update query statistics - Graceful shutdown support - Add Vacuum() and Analyze() methods to database interface
This commit is contained in:
@@ -627,11 +627,11 @@ func (s *Streamer) stream(ctx context.Context) error {
|
||||
// Peer state changes - silently ignore
|
||||
continue
|
||||
default:
|
||||
s.logger.Error("Unknown message type",
|
||||
s.logger.Warn("Unknown message type, skipping",
|
||||
"type", msg.Type,
|
||||
"line", string(line),
|
||||
)
|
||||
panic(fmt.Sprintf("Unknown RIS message type: %s", msg.Type))
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
// Dispatch to interested handlers
|
||||
|
||||
Reference in New Issue
Block a user