Skip to content
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

explore possibility of DB stored settings to augment localsettings.py #409

Open
ghukill opened this issue Jun 6, 2019 · 1 comment
Open

Comments

@ghukill
Copy link
Contributor

ghukill commented Jun 6, 2019

Many important variables/configurations are stored in localsettings.py. Unfortunately, this means only someone with server level access can update these, and restart Combine. A good example of a configuration that a user of Combine might want to edit is COMBINE_OAI_IDENTIFIER which is a string that becomes part of all OAI identifiers on the way out.

Can imagine a JSON document stored in Mongo that could override the normal pipeline of localsettings.py overwriting and augmenting settings.py. If this were called appsettings or hotsettings (suggesting they are DB, not file driven), just as a handle, the series of overrides would be:

settings.py --> localsettings.py --> appsettings (Mongo JSON document)

These settings are almost exclusively retrieved from django.settings, which means it might also be possible to merge/interleave some settings from appsettings "hot" during the request/response cycles, avoiding the need for a restart. The danger here is that not all would be possible in this way, like settings that are used and passed to Livy/Spark, or Celery.

@ghukill ghukill changed the title explore possibility of DB stored settings to override localsettings.py explore possibility of DB stored settings to augment localsettings.py Jun 6, 2019
@antmoth
Copy link
Collaborator

antmoth commented Jul 31, 2019

I'm going to advocate for using an actual settings table instead of a JSON document. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants