-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Adds extensible possibilities to the API class to support dynamic resources loading and hot-reload logic mechanisms #1841
base: master
Are you sure you want to change the base?
Conversation
72868dc
to
f0a3d5d
Compare
Is It might be nice to have a tiny example implementation of this so it's easier to see how this would be used. Since tests are also missing right now, maybe a example could be part of a test? |
Hey totycro, Thank you for your comment. That way, in the custom implementation override (i.e in For example, in our implementation, we have all resources stored in a database (not the yaml file), because we have multiple pygeoapi instances running in parallel (load balanced) and we wanted them all to use the resources centralized in a database and those resources can change any time. When the resources change, we flag a date in the database about it. Therefore, in our That being said, one can have different ways of checking for a reload flag, it doesn't have to be a central database. That is why, in the implementation I'm suggesting, the To your point also, yes, if one implements |
f0a3d5d
to
39c164b
Compare
39c164b
to
56d00bd
Compare
56d00bd
to
d72dcdf
Compare
d72dcdf
to
0e250f3
Compare
e5808a5
to
3ee5907
Compare
3ee5907
to
560ef6f
Compare
560ef6f
to
7f090af
Compare
316efff
to
d6d256a
Compare
d6d256a
to
b02a192
Compare
Overview
This PR adds 2 methods and 2 overridable methods in the API class to allow for:
This PR also adds a decorative function to make sure the resources are always up to date with the possibly dynamic resources material.
With the overridable functions implementations, this PR doesn't alter the native way pygeoapi works.
Related Issue / discussion
Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)