Skip to content

Commit

Permalink
Update ovos_core/skill_manager.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
JarbasAl and coderabbitai[bot] authored Dec 9, 2024
1 parent 582d485 commit 368c79e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ovos_core/skill_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,16 @@ def _load_new_skills(self, network=None, internet=None, gui=None):

if loaded_new:
LOG.info("Requesting padatious intent training")
self.bus.wait_for_response(Message("padatious:train"),
"mycroft.skills.trained")
try:
response = self.bus.wait_for_response(Message("padatious:train"),
"mycroft.skills.trained",
timeout=60) # 60 second timeout
if not response:
LOG.error("Padatious training timed out")
elif response.data.get('error'):
LOG.error(f"Padatious training failed: {response.data['error']}")
except Exception as e:
LOG.exception(f"Error during padatious training: {e}")
else:
LOG.debug("Nothing new to train")

Expand Down

0 comments on commit 368c79e

Please sign in to comment.