Skip to content

Live configuration reloading #955

@VadimVolkovsky

Description

@VadimVolkovsky

Is there any way to reload configuration in a runtime ?
i.e my app is running and i need to change some values in config.ini without restarting the app

# config.ini
[auth]
token_ttl=3600  # changing to 3900

I found a solution with watchdog library, which tracks config.ini file and reload configuration with from_ini() method

container.config.from_ini(self._config_path)

but maybe there are better ways to do it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions