joao figueiredo
joao figueiredo

Reputation: 145

Openshift custom env vars not available in Python

I'm trying to get a Python 2.7, Django 1.7 web gear up and running.

I have hot_deploy activated.

However, after setting my required env vars (via rhc), and I see them set in the gear ('env | grep MY_VAR' is OK), when running the WSGI script the vars are NOT SET.

os.environ['MY_VAR'] yields KeyError. Is this somehow related to hot_deploy?

Upvotes: 0

Views: 42

Answers (1)

user2879327
user2879327

Reputation:

You probably just need to stop & start (not restart) your application via the rhc command line so that your python environment can pick them up.

Upvotes: 1

Related Questions