Skip to content

Commit 5c0f6b1

Browse files
authored
improve skill shutdown (#716)
* bump packages * Update tests.txt
1 parent ee9a23d commit 5c0f6b1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

ovos_core/skill_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,14 @@ def _unload_plugin_skill(self, skill_id):
487487
LOG.info('Unloading plugin skill: ' + skill_id)
488488
skill_loader = self.plugin_skills[skill_id]
489489
if skill_loader.instance is not None:
490+
try:
491+
skill_loader.instance.shutdown()
492+
except Exception:
493+
LOG.exception('Failed to run skill specific shutdown code: ' + skill_loader.skill_id)
490494
try:
491495
skill_loader.instance.default_shutdown()
492496
except Exception:
493-
LOG.exception('Failed to shutdown plugin skill: ' + skill_loader.skill_id)
497+
LOG.exception('Failed to shutdown skill: ' + skill_loader.skill_id)
494498
self.plugin_skills.pop(skill_id)
495499

496500
def is_alive(self, message=None):

requirements/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ ovos-utils[extras]>=0.6.0,<1.0.0
77
ovos_bus_client>=0.1.4,<2.0.0
88
ovos-plugin-manager>=1.0.3,<2.0.0
99
ovos-config>=0.0.13,<3.0.0
10-
ovos-workshop>=7.0.4,<8.0.0
10+
ovos-workshop>=7.0.5,<8.0.0

requirements/tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pytest-cov>=2.8.1
55
pytest-testmon>=2.1.3
66
pytest-randomly>=3.16.0
77
cov-core>=1.15.0
8-
ovoscope>=0.6.0,<1.0.0
8+
ovoscope>=0.7.1,<1.0.0

0 commit comments

Comments
 (0)