Skip to content

Commit

Permalink
Merge pull request #1441 from Odianosen25/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Odianosen25 authored Jan 3, 2022
2 parents c58e826 + d317dab commit 7e18ac4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion appdaemon/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from functools import wraps
from appdaemon.version import __version__ # noqa: F401
from collections.abc import Iterable
import concurrent.futures

if platform.system() != "Windows":
import pwd
Expand Down Expand Up @@ -343,7 +344,7 @@ def run_coroutine_threadsafe(self, coro):
future = asyncio.run_coroutine_threadsafe(coro, self.AD.loop)
try:
result = future.result(self.AD.internal_function_timeout)
except asyncio.TimeoutError:
except (asyncio.TimeoutError, concurrent.futures.TimeoutError):
if hasattr(self, "logger"):
self.logger.warning(
"Coroutine (%s) took too long (%s seconds), cancelling the task...",
Expand Down
1 change: 1 addition & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Change Log
- Fixed issue whereby `.git` paths where being imported into AD and leading to lots of unnecessary messages.
- Fixed issue with AD being unable to refresh Plugin's entities
- Fixed issue with using the `loop` in sequences for certain services
- Fixed issue whereby the wrong the wrong timeout error was being captured, when running a coroutine
- Documentation fixes - contributed by `markwmuller <https://github.com/markwmuller>`__
- Documentation fixes - contributed by `JonasPed <https://github.com/JonasPed>`__
- Documentation fixes - contributed by `elandt <https://github.com/elandt>`__
Expand Down

0 comments on commit 7e18ac4

Please sign in to comment.