Please help me understand the uWSGI configuration logic. I have an environment variable ENVIRONMENT
. Let them say that its meanings can be either dev
or prod
. I want to set configuration parameters based on valueENVIRONMENT
if-env= ENVIRONMENT
if-opt: %(_)=dev
print = RUNNING %(_)
endif:
endif =
running = ENVIRONMENT
if-opt: running=dev
print = RUNNING %(_)
endif:
I would suggest that if ENVIRONMENT
set to prod
, none of the assignments or print
statements inside the block if-opt
will be executed. But this is not so.
source
share