Refactor logging and improve service initialization
- Updated logging in `search-server.ts` to use `silentDebug` for non-critical messages, reducing console noise. - Added a health check endpoint in `worker-service.ts` to improve service monitoring. - Modified the worker service startup process to start the HTTP server immediately and perform slow initialization in the background. - Refactored database initialization in `Database.ts` to use the correct `Database` class. - Implemented a port availability check in `context-hook.ts` to ensure the worker service is ready before making requests.
This commit is contained in:
@@ -387,7 +387,7 @@ async function main() {
|
||||
} catch (error) {
|
||||
// Worker might already be running or PM2 not available - that's okay
|
||||
// The ensureWorkerRunning() function will handle auto-start when needed
|
||||
log('ℹ️ Worker will start automatically when needed', colors.dim);
|
||||
log('ℹ️ Worker startup error', colors.dim);
|
||||
}
|
||||
|
||||
// Success - dependencies installed (if needed)
|
||||
|
||||
Reference in New Issue
Block a user