Bug fix for plugin reload mechanism (#5660)

- Save updated hash after reload
- Use actual *value* of active, not the function object!
This commit is contained in:
Oliver 2023-10-04 23:05:48 +11:00 committed by GitHub
parent ffda700244
commit 3d8e3f1625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,6 +275,8 @@ class PluginsRegistry:
self.plugins_loaded = True
self._load_plugins(full_reload=full_reload)
self.update_plugin_hash()
self.loading_lock.release()
logger.info('Plugin Registry: Loaded %s plugins', len(self.plugins))
@ -660,7 +662,7 @@ class PluginsRegistry:
for slug, plug in self.plugins.items():
data.update(str(slug).encode())
data.update(str(plug.version).encode())
data.update(str(plug.is_active).encode())
data.update(str(plug.is_active()).encode())
return str(data.hexdigest())