openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[jrubyscripting] Dependency tracker caused scripts to reload multiple times #13922

Open jimtng opened 1 year ago

jimtng commented 1 year ago

To reproduce: On a running system, perform a gem update of a specific gem. This will trigger the dependency tracker which will cause openhab to reload ruby scripts. However it will reload all the scripts several times. For example, I have a script "test.rb" that issued logger.warn RUBY_VERSION. This is the only script that does it. This log showed up several times indicating that it was reloaded more than once.

In my case, all my rules reloaded three times.

ping @ccutrer

lsiepel commented 3 months ago

If i remember correctly with openHAB 4 many changes to these scripting engine was done and i wonder if this issue is still valid. Could you verify with openHAB 4.2.0?

jimtng commented 3 months ago

I think I'm still seeing this, but haven't paid attention to it. I'll look into it again.