flask_waffleconf.watcher

flask_waffleconf.watcher._dummy(state)

Does nothing.

flask_waffleconf.watcher._file_notifier(state)

Notify of configuration update through file.

Parameters:state (_WaffleState) – Object that contains reference to app and its configstore.
flask_waffleconf.watcher._file_watcher(state)

Watch for file changes and reload config when needed.

Parameters:state (_WaffleState) – Object that contains reference to app and its configstore.
flask_waffleconf.watcher._redis_notifier(state)

Notify of configuration update through redis.

Parameters:state (_WaffleState) – Object that contains reference to app and its configstore.
flask_waffleconf.watcher._redis_watcher(state)

Listen to redis channel for a configuration update notifications.

Parameters:state (_WaffleState) – Object that contains reference to app and its configstore.
flask_waffleconf.watcher.get_notifier(notifier_type)

Obtain a notifier function.

Parameters:notifier_type (str) – Either ‘file’ or ‘redis’. If redis is not available, it will default to file watcher.
Returns:Notifier function.
flask_waffleconf.watcher.get_watcher(watcher_type)

Obtain a watcher function.

These functions should be executed in a separate thread.

Parameters:watcher_type (str) – Either ‘file’ or ‘redis’. If redis is not available, it will default to file watcher.
Returns:Watcher function.