Perform config magic before extension loading
* previously, our configuration magic was performed as part of the `finalize_app` entrypoint * while this worked well enough for most use cases, some extensions would break this model by caching values during their initialization * especially caching-related extensions like to take eagerly create clients with the current configuration items, which are hard to fix afterwards * keeping track of all the instantiated clients just to change their connection details when we perform our magic really didn't seem like a good approach * so instead, we now made sure that our extension is loaded first and can thus perform its configuration magic before any other extension has a chance of caching values * also, extension loading happens after the configuration loading is done (especially the handling of environment variables)
parent
6de35f74
Showing
- invenio_config_tuw/config.py 39 additions, 0 deletionsinvenio_config_tuw/config.py
- invenio_config_tuw/ext.py 15 additions, 5 deletionsinvenio_config_tuw/ext.py
- invenio_config_tuw/startup/__init__.py 1 addition, 2 deletionsinvenio_config_tuw/startup/__init__.py
- invenio_config_tuw/startup/config.py 18 additions, 32 deletionsinvenio_config_tuw/startup/config.py
- pyproject.toml 11 additions, 6 deletionspyproject.toml
Loading
Please register or sign in to comment