{"comment":{"url":"https://api.github.com/repos/carljm/wsgiwatcher/comments/10723315","html_url":"https://github.com/carljm/wsgiwatcher/commit/87f8863f4f37c465c9d1e2707bf8b0477a413093#commitcomment-10723315","id":10723315,"user":{"login":"davisagli","id":49014,"avatar_url":"https://avatars.githubusercontent.com/u/49014?v=3","gravatar_id":"","url":"https://api.github.com/users/davisagli","html_url":"https://github.com/davisagli","followers_url":"https://api.github.com/users/davisagli/followers","following_url":"https://api.github.com/users/davisagli/following{/other_user}","gists_url":"https://api.github.com/users/davisagli/gists{/gist_id}","starred_url":"https://api.github.com/users/davisagli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisagli/subscriptions","organizations_url":"https://api.github.com/users/davisagli/orgs","repos_url":"https://api.github.com/users/davisagli/repos","events_url":"https://api.github.com/users/davisagli/events{/privacy}","received_events_url":"https://api.github.com/users/davisagli/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"87f8863f4f37c465c9d1e2707bf8b0477a413093","created_at":"2015-04-14T20:18:24Z","updated_at":"2015-04-14T20:18:24Z","body":"About to take off so can't analyze in detail but +1 on this approach. I was also wondering about servers that use process pools.\n\nDavid Glick\n(mobile)\n\n> On Apr 14, 2015, at 4:08 PM, Carl Meyer <notifications@github.com> wrote:\n> \n> So after much discussion with @mcdonc, we're leaning towards something that doesn't even try to magically inject itself into server sub-processes in any way, because that appears to be fraught with perils if we're trying to be server agnostic - servers do so many different things (e.g. gunicorn fires up its own individual worker processes, so if we interrogate sys.modules in the gunicorn master process it might not even give us useful results). Instead we'd define a \"protocol\" (probably just a file with a list of paths in it?), and our watcher will just watch whatever's in that file (as well as watching that file itself for changes!). Then we can also provide a lib people can import in their server process if they want to really easily fire up a thread that monitors sys.modules and writes to the watcher file-list. So we get more explicit behavior and a clearer separation of responsibilit ies betw een the monitor and the monitored process, at the expense of requiring a bit more cooperation from the monitored process if it wants magical \"monitor everything in sys.modules\" behavior.\n> \n> @davisagli interested in your thoughts on that!\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}