Created
January 20, 2017 16:39
-
-
Save saranrapjs/2219ff2db1105d46b179d3f697d6bd99 to your computer and use it in GitHub Desktop.
This patch fixes the `goapp` local dev server to ignore GOPATH changes, the watching of which would otherwise yield the "There are too many files in your application for changes in all of them to be monitored" error.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- mtime_file_watcher.py 2017-01-20 11:36:51.000000000 -0500 | |
+++ mtime_file_watcher.py.new 2017-01-20 11:37:24.000000000 -0500 | |
@@ -139,6 +139,9 @@ | |
""" | |
filename_to_mtime = {} | |
num_files = 0 | |
+ gopath = os.environ["GOPATH"]+os.sep+"src" | |
+ if self._directory == gopath: | |
+ return filename_to_mtime | |
for dirpath, dirnames, filenames in os.walk(self._directory, | |
followlinks=True): | |
if self._quit_event.is_set(): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this should work: