You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the configuration of an active plugin changes, metagov-core deletes the plugin instance and creates a brand new one. This means that all the plugin state is lost. This might not be desirable for some plugins that use state to persist data that is updated via actions (see the "revshare" plugin).
Instead of deleting and recreating plugins, expose a handler that lets the plugin author decide what should happen when the config is changed.
Related to discussion #16.
gigxz
changed the title
Expose config change handler to Plugin instead of deleting and re-creating
Expose config change handler to Plugin, instead of deleting and re-creating
Apr 30, 2021
When the configuration of an active plugin changes, metagov-core deletes the plugin instance and creates a brand new one. This means that all the plugin
state
is lost. This might not be desirable for some plugins that use state to persist data that is updated via actions (see the "revshare" plugin).Instead of deleting and recreating plugins, expose a handler that lets the plugin author decide what should happen when the config is changed.
Related to discussion #16.
Relevant code in core:
https://github.com/metagov/metagov-prototype/blob/70e8b4752e82b1bfc11dd3274071acd5734ce94c/metagov/metagov/core/serializers.py#L30-L34
The text was updated successfully, but these errors were encountered: