Skip to content

Commit

Permalink
Update ovos_padatious/opm.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 Oct 16, 2024
1 parent 344ba8b commit 094aa3e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ovos_padatious/opm.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,16 @@ def __init__(self, bus: Optional[Union[MessageBusClient, FakeBus]] = None,
self.bus.on('detach_intent', self.handle_detach_intent)
self.bus.on('detach_skill', self.handle_detach_skill)
self.bus.on('mycroft.skills.initialized', self.train)
self.bus.on('intent.service.padatious.get', self.handle_get_padatious)
self.bus.on('intent.service.padatious.manifest.get', self.handle_padatious_manifest)
self.bus.on('intent.service.padatious.entities.manifest.get', self.handle_entity_manifest)
def shutdown(self):
# Existing code...
self.bus.remove('padatious:register_intent', self.register_intent)
self.bus.remove('padatious:register_entity', self.register_entity)
self.bus.remove('detach_intent', self.handle_detach_intent)
self.bus.remove('detach_skill', self.handle_detach_skill)
self.bus.remove('mycroft.skills.initialized', self.train)
self.bus.remove('intent.service.padatious.get', self.handle_get_padatious)
self.bus.remove('intent.service.padatious.manifest.get', self.handle_padatious_manifest)
self.bus.remove('intent.service.padatious.entities.manifest.get', self.handle_entity_manifest)

self.finished_training_event = Event()
self.finished_initial_train = False
Expand Down

0 comments on commit 094aa3e

Please sign in to comment.