Skip to content

Commit

Permalink
Patch configuration reload
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Sep 19, 2024
1 parent a48d1c7 commit 523e22d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions neon_speech/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@ def register_event_handlers(self):
self.bus.on("neon.enable_wake_word", self.handle_enable_wake_word)
self.bus.on("neon.disable_wake_word", self.handle_disable_wake_word)

# TODO: Patching config reload behavior
self.bus.on("configuration.patch", self._patch_handle_config_reload)

def _patch_handle_config_reload(self, _: Message):
# This patches observed behavior where the filewatcher fails to trigger.
# Configuration reload is idempotent, so calling it again will have
# minimal impact
self.config.reload()
self.reload_configuration()

def _handle_get_languages_stt(self, message):
if self.config.get('listener', {}).get('enable_voice_loop', True):
return OVOSDinkumVoiceService._handle_get_languages_stt(self,
Expand Down

0 comments on commit 523e22d

Please sign in to comment.