pnxtech / hydra-router

A service aware router for Hydra Services. Implements an API Gateway and can route web socket messages.
MIT License
60 stars 26 forks source link

Ensure process termination on cleanup #194

Open tomascasas opened 2 years ago

tomascasas commented 2 years ago

When Redis is down an error happens and cleanup signal is trying to update things in Redis, which throws. As a result, the unhandled exception is caught by handler that will attempt an cleanup again with same results, endless loop, maybe... so I wrapped the cleanup handler in try/catch block so that the process is effectively terminated and it can be collected by the container and restarted.