Skip to content

Reload changes from config.py #4878

Answered by tachyondecay
chevcheli0s asked this question in Q&A
Discussion options

You must be logged in to vote

You can call app.config.update() at any time to update your app's configuration, but you probably shouldn’t.

Remember that under most circumstances, you’ll be running multiple workers/threads and therefore multiple instances of your app. Therefore, updating the config in this way would only affect a single instance.

If you have changed your configuration, you should restart all running instances of your app.

If you have data that you expect to change while the app is running, you should store it in a database, redis, etc.—somewhere centralized that your app can query whenever it needs that data.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chevcheli0s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants