Added error handling to wait for Redis to come up.