Is there a way to automatically reload Supervisor processes?
supervisord
Solution
You should be able to use an Event Listener which monitors the filesystem (with perhaps watchdog) and emits a restart using the XML-RPC API. Check out the `memmon` listener from the superlance package for inspiration. It wouldn't need to be that complicated. And since the watchdog would call your restart routine you don't need to read the events using `childutils.listener.wait`.
Alternatively, git hooks might do the trick if the permissions are correct for the supervisord API to be accessed (socket permissions, HTTP passwords). A simpler but less-secure approach.
A simpler and even less-secure approach would be to allow you to issue a `supervisorctl restart`. The running user has to match your push user (or git, or www, depending on how you have it setup). Lot's of ways to have it go wrong security-wise. But for development, might do fine.
Related:
- Supervisord: is there any way to touch-reload a child?
Problem
I have a dev server which I often push code changes to over Git. After each push, I need to manually log into the server and restart the supervisor processes. Is there a way to have Supervisor monitor a filesystem directory for changes and reload the process(es) on changes?