(future)
| 1999 | futures = set() |
| 2000 | |
| 2001 | def future_completed(future): |
| 2002 | with futures_lock: |
| 2003 | futures.discard(future) |
| 2004 | |
| 2005 | try: |
| 2006 | futures_results.append(future.result()) |
| 2007 | except Exception as exc: |
| 2008 | futures_results.append(exc) |
| 2009 | |
| 2010 | if futures: |
| 2011 | return |
| 2012 | |
| 2013 | log.debug('All futures have completed for added host %s', host) |
| 2014 | |
| 2015 | for exc in [f for f in futures_results if isinstance(f, Exception)]: |
| 2016 | log.error("Unexpected failure while adding node %s, will not mark up:", host, exc_info=exc) |
| 2017 | return |
| 2018 | |
| 2019 | if not all(futures_results): |
| 2020 | log.warning("Connection pool could not be created, not marking node %s up", host) |
| 2021 | return |
| 2022 | |
| 2023 | self._finalize_add(host) |
| 2024 | |
| 2025 | have_future = False |
| 2026 | for session in tuple(self.sessions): |
nothing calls this directly
no test coverage detected