stavinsky / supervisord-touch-reload

Very basic script used to add "touch-reload" like in uwsgi to supervisord
MIT License
8 stars 0 forks source link

Shoud listen for file changes, not access #3

Open hackel opened 7 years ago

hackel commented 7 years ago

It looks like touch_reload is currently checking the file access time in some kind of loop and restarting the service when it changes. Instead, it should only do this when a file's (or directory's) contents have actually changed. In addition, this should be done asynchronously using the OS's own polling mechanism instead of on a loop, perhaps using something like gorakhargosh/watchdog so it's not consuming resources and wearing on the filesystem constantly.