Skip to main content

Module sources

Module sources 

Source
Expand description

Where configuration comes from: the file, SCHEDR_CONFIG__* environment variables, the short aliases, and command-line flags (see archive/PROJECT.md, Configuration).

Every source is a figment provider whose metadata names the exact origin of a value (the file, SCHEDR_CONFIG__OPS__PORT, SCHEDR_DAG_PATH, --ops-port), so error messages say where a bad value came from.

Structs§

FileSource
The configuration file’s contents, with its path for messages.
Override
A configuration value given on the command line, e.g. --ops-port 9100.

Enums§

ConfigFile
Which configuration file to read.
OverrideValue
What a command-line flag gives.
SourceError
Why an environment variable can’t be used as configuration.

Constants§

ALIASES
Short aliases: environment variable → configuration key.
CONFIG_FILE_ENV
The environment variable naming the configuration file.
DEFAULT_CONFIG_FILE
The configuration file read when neither --config nor SCHEDR_CONFIG_FILE names one.
ENV_PREFIX
The prefix of environment variables that mirror the configuration file.

Functions§

config_file
Chooses the configuration file: the --config flag, then SCHEDR_CONFIG_FILE, then DEFAULT_CONFIG_FILE.
env_key
The configuration key of a SCHEDR_CONFIG__ variable (SCHEDR_CONFIG__DAGS__POLL_INTERVAL → dags.poll_interval), or None for other variables.