No GAE Go SDK release for 3 month

114 views
Skip to first unread message

dcco...@gmail.com

unread,
Oct 18, 2016, 2:23:13 PM10/18/16
to google-appengine-go
Hi,

Would you care updating us about the next release? It has been over 3 months since the last one, and Go 1.7 is not still supported and dev_appserver.py keeps eating cpu and spinning fans because of watching too many files in GOPATH.

bsr

unread,
Oct 20, 2016, 6:33:37 AM10/20/16
to google-appengine-go, dcco...@gmail.com
Hi,

I too was struggling with high cpu, the way I handle is

In SDK edit go_appengine/google/appengine/tools/devappserver2/go_runtime.py

and change "get_restart_directories" to  watch for WATCHPATH not GOPATH

def get_restart_directories(self):
    """Returns a list of directories changes in which should trigger a restart.

    Returns:
      A list of src directory paths in the GOPATH. Changes (i.e. files added,
      deleted or modified) in these directories will trigger a restart of all
      instances created with this factory.
    """
    try:
      go_path = os.environ['WATCHPATH']
    except KeyError:
      return []
    else:
      if sys.platform.startswith('win32'):
        roots = go_path.split(';')
      else:
        roots = go_path.split(':')
      dirs = [os.path.join(r, 'src') for r in roots]
      return [d for d in dirs if os.path.isdir(d)]


then set WATCHPATH and run the app
WATCHPATH=<all the dir to watch> --enable_sendmail  dev_appserver.py 

HTH
bsr
Reply all
Reply to author
Forward
0 new messages