benoitc / gunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
http://www.gunicorn.org
Other
9.73k stars 1.74k forks source link

Reloader: follow symlinks for reload_extra_files #3243

Open cfelder opened 2 months ago

cfelder commented 2 months ago

Currently the mtime check for extra files does not follow symlinks, thus cannot determine updates on symlinked files.

(I've currently no use case in mind where it would make more sense to wait for an update on the symlink.)

pajod commented 4 weeks ago

Care to give an example, what would a directory look like where the current behavior is inappropriate?

Watching the directory per inotify rules or the file per stat (not lstat!) rules makes the most sense in all scenarios I can imagine (but then again, I cannot imagine why anyone would nowadays use symlinks for situations where a symlink-free race-free RENAME_EXCHANGE operation is sufficient).