-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way for JSON-RPC V2 plugins to get settings on initialization/restart #3090
Comments
How about we abandon the setting passed via query and completely adopt the request/response model via a |
Yeah, I also thought that it's a little awkward. It probably made sense in API v1, when plugin's whole lifecycle was start-respond to query-end, but having
|
but would then the |
If you're talking about it being redundant when there are points 1 and 2: I thought that there might be a use case when the user haven't used the plugin for a while, but the plugin needs to update some data for example every 5 minutes. It needs to do so using the current settings that might have changed since the last time the user used the plugin. If you're talking about point 4, then I agree, |
I actually feel like point 4 is quite interesting as a proactor mode. Was a little bit trapped by application lately. I will write some impl after this week. Or on the other hand if you would like to proceed feel free to do so. |
@Yusyuriv how do you think we make it event driven. When setting is changed by user, we invoke a |
So the event will only send the changed parts, and if you need to get all of the current settings, you'd use |
Is your feature request related to a problem? Please describe.
I'm writing a python library that uses the V2 json-rpc api, and it really annoys me that although there is an initialization request that would be perfect for plugins to create a cache, plugins have to wait until the first query request is received to start building their cache, resulting in long first queries. This is because currently, the plugin's settings only seem to be sent to the plugin on query requests.
Describe the solution you'd like
I'd be ok with either of the following solutions:
GetSettings
method to the public Flow API, so that plugins can request the settings on initialization.initialize
method's parameters (and based on how #Reload Context #3081 gets resolved, making sure its in therestart
method's parameters as well)Describe alternatives you've considered
Having the plugin read the plugin's settings file on restart, but although this would probably work as a "solution", this issue seems like it should have a better fix.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: