Skip to content
This repository

gunicorn_django and absolute/relative path #213

oinopion opened this Issue May 30, 2011 · 2 comments

3 participants

Tomasz Paczkowski Benoit Chesneau Noah Kantrowitz
Tomasz Paczkowski

I'm starting my gunicorn from project directory with relative settings path, like:
cd $PROJECT_DIR; gunicorn_django
I have deployment process that depends on symlinks, $PROJECT_DIR is a symlink to current release/tag. With that setup doing kill -HUP on gunicorn process failed to do expected.
sys.path reports the real path, not symlinked one, so reloading works, although in different directory than expected.

Problem can be mitigated by providing absolute path (with symlinks) to

My debugging took me to from python standard lib, where abspath calls os.getcwd.It seems that POSIX getcwd returns canonical path without symlinks:

Not sure what you want to do with this issue, if you don't want to work around it, it is certainly worth mentioning in documentation.

Noah Kantrowitz

Adding myself to CC in relation to

Benoit Chesneau benoitc referenced this issue from a commit August 21, 2011
get settings module name on fork rather than on app initialization. It
allows people to use relative path in their projects. fix issues #219,
and #213
Benoit Chesneau

fixed in 17b47a3. Thanks for the report.

Benoit Chesneau benoitc closed this August 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.