Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if current_time - ldc > self.dead_timeout:
for server, dead_time in self._dead_clients.items():
if current_time - dead_time > self.dead_timeout:
logger.debug(
'bringing server back into rotation %s',
server
)
self.add_server(*server)
self._last_dead_check_time = current_time
server = self.hasher.get_node(key)
# We've ran out of servers to try
if server is None:
if self.ignore_exc is True:
return
raise MemcacheError('All servers seem to be down right now')
client = self.clients[server]
return client