Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix/fallback_timeout_handling
Browse files Browse the repository at this point in the history
by using a killable_event we can abort fallbacks that timedout avoiding multiple answers

closes #389

needs OpenVoiceOS/OVOS-workshop#210
JarbasAl committed Jun 18, 2024
1 parent a28fb47 commit e88334b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ovos_core/intent_services/fallback_service.py
Original file line number Diff line number Diff line change
@@ -148,13 +148,13 @@ def attempt_fallback(self, utterances, skill_id, lang, message):
elif result is not None:
return result.data.get('result', False)
else:
#
# https://github.com/OpenVoiceOS/ovos-core/issues/389
# abort any ongoing fallback
# if skill crashed or returns False, all good
# if it is just taking a long time, more than 1 fallback will end up answering
# TODO - abort responses somehow? @killable_intents decorator?
LOG.error(f"{skill_id} took too long to answer, you may still receive it's delayed answer")
LOG.warning('increasing "timeout" in mycroft.conf might help alleviate this issue')
# if it is just taking a long time, more than 1 fallback would end up answering
self.bus.emit(message.forward("ovos.skills.fallback.force_timeout",
{"skill_id": skill_id}))
LOG.warning(f"{skill_id} took too long to answer, "
f'increasing "timeout" in mycroft.conf might help alleviate this issue')
return False

def _fallback_range(self, utterances, lang, message, fb_range):

0 comments on commit e88334b

Please sign in to comment.