hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
149 stars 46 forks source link

Doco: Is there a "hot reload" for python code changes? (without having to restart all of AppDaemon) #246

Closed callagga closed 1 year ago

callagga commented 1 year ago

Can I ask is there is there a "hot reload" for python code changes? (without having to restart all of AppDaemon).

I note from issue 9 that the restart process (which is slow) is expected behavior when you "restart" the Appdaemon plugin, so wondering what others do (i.e. what is possible) re getting faster turn around when you change say one line of python code in one of the files running on appdaemon?

frenck commented 1 year ago

There is no such thing in Python.

teskanoo commented 1 year ago

Can I ask is there is there a "hot reload" for python code changes? (without having to restart all of AppDaemon).

I note from issue 9 that the restart process (which is slow) is expected behavior when you "restart" the Appdaemon plugin, so wondering what others do (i.e. what is possible) re getting faster turn around when you change say one line of python code in one of the files running on appdaemon?

@callagga This can be achieved using dependencies in your configuration

https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html#app-dependencies

callagga commented 1 year ago

Thanks @teskanoo. I’ll look at this tonight but this seems like dépendances between multiple apps no? The issue I’m referring to is after a restart it looks the Appdaemon plugin is taking a long time re-loading Python libraires it uses within the app..