mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-06 20:51:29 +08:00
The Arbiter is smart about getting the CWD; first it checks the CWD environment (which doesn't resolve symlinks), then it falls back to the python os.getcwd() (which does resolve symlinks). However, the Arbiter is the only place that does this, which will then do the right thing when we reexec. However, when reloading the Arbiter, it won't pick up changes if the symlink has changed. By changing the *app.py entry points to also use the same method for determining the CWD, we'll insert a symlink path into the first location in sys.path. Then our reloaded app will correctly pull in any new changes.