You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
In the main.py file there is an import from core.config import config, which means that get_config() is being executed before os.environ["ENV"] = env from main(), so I always end up with "development" from ENV: str = "development".
Am I missing something?
The text was updated successfully, but these errors were encountered:
I noticed the exact same thing. Setting the environment variable via ENV=prod python main.py works, while python main.py --env prod does not, due to the execution order of get_config() that you mentioned, which determines the config based on the environment variable ENV.
Я заметил то же самое. Установка переменной среды через ENV=prod python main.pyработает, а python main.py --env prodне из-за упомянутого вами порядка выполнения get_config(), который определяет конфигурацию на основе переменной среды ENV.
Hi.
In the main.py file there is an import
from core.config import config
, which means that get_config() is being executed beforeos.environ["ENV"] = env
from main(), so I always end up with "development" fromENV: str = "development"
.Am I missing something?
The text was updated successfully, but these errors were encountered: