Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppEngine too many directory to be monitored

I got this warning when I ran goapp serve.

WARNING 2014-07-03 10:39:40,724 inotify_file_watcher.py:143] There are too many directories in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files

The cause maybe because of the npm_modules folder. I try to solve it using skip_files in app.yaml but the warning still exist.

skip_files:
- ^(.*/)?.*/node_modules/.*$
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$

What should I do?

like image 625
Blodstone Avatar asked Dec 25 '22 07:12

Blodstone


2 Answers

I solved it by editing one line in watcher_common.py located in go_appengine/google/appengine/tools/devappserver2.

_IGONERD_DIRS = ('.git', '.hg', '.svn', 'node_modules')
like image 31
Blodstone Avatar answered Dec 27 '22 21:12

Blodstone


Updated for current version of GAE's goapp serve watcher (_IGNORED_DIRS was replaced).

In .../appengine/tools/devappserver2/watcher_common.py, change

def skip_ignored_dirs(dirs):
  """Skip directories that should not be watched."""

  _remove_pred(dirs, lambda d: d.startswith(_IGNORED_PREFIX))

to

_IGNORED_DIRS = ('node_modules',)

def skip_ignored_dirs(dirs):
  """Skip directories that should not be watched."""

  _remove_pred(dirs, lambda d: d.startswith(_IGNORED_PREFIX) or d in _IGNORED_DIRS)
like image 79
Spencer Avatar answered Dec 27 '22 19:12

Spencer