Enhance lock acquisition and error handling in worker service
- Implement retry logic for acquiring file lock with a maximum of 3 attempts. - Improve error handling for ENOENT errors by ensuring the directory exists before retrying. - Update context injection handler to delegate to SearchRoutes, reducing code duplication and preventing "headers already sent" errors. - Add checks for headersSent in error responses to avoid sending multiple responses. - Log warnings when the port does not free up after shutdown, and handle forced shutdown scenarios more gracefully.
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user