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 10, 2021
1 parent 95a48b8 commit 5504f76
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 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.13"
VERSION = "1.14b1"

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -743,8 +743,8 @@ async def _initGetContainer(self):
async def _run(self):
"""Loop to gather container info/stats."""

try:
while True:
while True:
try:

# Don't check container if we are doing a start/stop
if not self._busy:
Expand All @@ -763,16 +763,16 @@ async def _run(self):
)

await asyncio.sleep(self._interval)
except concurrent.futures._base.CancelledError:
pass
except Exception as err:
_LOGGER.error(
"[%s] %s: Container not available anymore (3) (%s)",
self._instance,
self._name,
str(err),
exc_info=True,
)
except concurrent.futures._base.CancelledError:
pass
except Exception as err:
_LOGGER.error(
"[%s] %s: Container not available anymore (3) (%s)",
self._instance,
self._name,
str(err),
exc_info=True,
)

#############################################################
async def _run_container_info(self):
Expand Down

0 comments on commit 5504f76

Please sign in to comment.