Add debug logging and optimize SQLite performance
- Add debug logging for goroutines and memory usage (enabled via DEBUG=routewatch) - Increase SQLite connection pool from 1 to 10 connections for better concurrency - Optimize SQLite pragmas for balanced performance and safety - Add proper shutdown handling for peering handler - Define constants to avoid magic numbers in code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,10 @@ func (rw *RouteWatch) Shutdown() {
|
||||
rw.logger.Info("Flushing prefix handler")
|
||||
rw.prefixHandler.Stop()
|
||||
}
|
||||
if rw.peeringHandler != nil {
|
||||
rw.logger.Info("Flushing peering handler")
|
||||
rw.peeringHandler.Stop()
|
||||
}
|
||||
|
||||
// Stop services
|
||||
rw.streamer.Stop()
|
||||
|
||||
Reference in New Issue
Block a user