Change settings without a restart
Create a way to dynamically change the settings from inside Mopidy. So that e.g. frontend-extensions (like http) can update usernames, passwords, and other settings.
From jodal (mail):
I think that the right way to solve this would be to extend the core API with another (optional!) controller for changing the configuration. Regarding restarting, it should be possible (with time and effort) to make backends or other parts restartable without restarting the entire process.
#305 could be of use here
I've thought about this at times, and the likely solution is to allow the classes implemented by extensions to be config listeners. Upon config changes all the listeners would be notified and can re-read their config data from the config service/proxy.
For the short term we could also use this to have a SIGHUP signal for re-reading the config and letting extensions know they should check if they need to reinitialize. Even longer term the ideal state would be a core config service allowing true runtime configuration.
Am I right when I say that mopidy currently doesn't respond to a sighup? In the even shorter term it might suffice to have something just kill mopidy and let monit restart it. Obviously that's only works for Mopidy config, you still need some way to identify which bits of config require other means to take effect.
Wasn't there a discussion / PR for a config API in mopidy already? I assume by core config service you mean a system service? On 25 Feb 2015 19:44, "Thomas Adamcik" [email protected] wrote:
I've thought about this at times, and the likely solution is to allow the classes implemented by extensions to be config listeners. Upon config changes all the listeners would be notified and can re-read their config data from the config service/proxy.
For the short term we could also use this to have a SIGHUP signal for re-reading the config and letting extensions know they should check if they need to reinitialize. Even longer term the ideal state would be a core config service allowing true runtime configuration.
— Reply to this email directly or view it on GitHub https://github.com/mopidy/mopidy/issues/502#issuecomment-76040060.
By core config service I mean something new inside 'mopidy.core.*' which also exposes configs over the WS.
Oops, I thought I was replying to a thread in musicbox. Half of what I said can be ignored, sorry. On 25 Feb 2015 20:27, "Thomas Adamcik" [email protected] wrote:
By core config service I mean something new inside 'mopidy.core.*' which also exposes configs over the WS.
— Reply to this email directly or view it on GitHub https://github.com/mopidy/mopidy/issues/502#issuecomment-76048894.