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.
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 ancleanup
again with same results, endless loop, maybe... so I wrapped thecleanup
handler intry/catch
block so that the process is effectively terminated and it can be collected by the container and restarted.