Пример #1
0
  def CreateServer(self):

    with open(self.filename) as stream:
      appinfo_external = appinfo_includes.Parse(stream)

    appengine_config = vmconfig.BuildVmAppengineEnvConfig()
    vmstub.Register(vmstub.VMStub(appengine_config.default_ticket))
    app = meta_app.FullyWrappedApp(appinfo_external, appengine_config)
    self.server = self.server_class(self.host, self.port, app,
                                    appinfo_external)
    logging.info('Configured server on %s:%s', self.host, self.port)
Пример #2
0
  def CreateServer(self):

    with open(self.filename) as stream:
      appinfo_external = appinfo_includes.Parse(stream)

    appengine_config = vmconfig.BuildVmAppengineEnvConfig()
    vmstub.Register(vmstub.VMStub(appengine_config.default_ticket))








    if 'googleclouddebugger' in sys.modules:
      try:
        googleclouddebugger.AttachDebugger()
      except Exception as e:
        logging.warn('Exception while initializing Cloud Debugger: %s',
                     traceback.format_exc(e))








    try:
      import appengine_config as user_appengine_config
    except ImportError:
      pass

    app = meta_app.FullyWrappedApp(appinfo_external, appengine_config)
    self.server = self.server_class(self.host, self.port, app,
                                    appinfo_external)
    logging.info('Configured server on %s:%s', self.host, self.port)
Пример #3
0
def FullyWrappedAppFromYAML(filename, appengine_config):
    """Like FullyWrappedApp, but first arg is a file name containing YAML."""
    with open(filename) as stream:
        appinfo_external = appinfo_includes.Parse(stream)
    return FullyWrappedApp(appinfo_external, appengine_config)
Пример #4
0
def get_module_config(filename):
    """Returns the parsed module config."""
    with open(filename) as f:
        return appinfo_includes.Parse(f)