Skip to content

Commit

Permalink
Trying to make docker connection more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ualex73 committed Dec 11, 2021
1 parent 5504f76 commit 6349177
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions custom_components/monitor_docker/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
PRECISION,
)

VERSION = "1.14b1"
VERSION = "1.14b2"

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -762,9 +762,14 @@ async def _run(self):
self._name,
)

await asyncio.sleep(self._interval)
except concurrent.futures._base.CancelledError:
_LOGGER.debug(
"[%s] %s: Container received concurrent.futures._base.CancelledError",
self._instance,
self._name,
)
pass
break
except Exception as err:
_LOGGER.error(
"[%s] %s: Container not available anymore (3) (%s)",
Expand All @@ -774,6 +779,9 @@ async def _run(self):
exc_info=True,
)

# Sleep in normal and exception situation
await asyncio.sleep(self._interval)

#############################################################
async def _run_container_info(self):
"""Get container information, but we can not get
Expand Down

0 comments on commit 6349177

Please sign in to comment.