Esempio n. 1
0
 def create_app(self, proj_name):
     """
     Returns a new configured MapProxy app and a dict with the
     timestamps of all configuration files.
     """
     mapproxy_conf = self.loader.app_conf(proj_name)['mapproxy_conf']
     log.info('initializing project app %s with %s', proj_name, mapproxy_conf)
     app = make_mapproxy_wsgi_app(mapproxy_conf, debug=self.debug)
     return app, app.config_files
Esempio n. 2
0
 def create_app(self, proj_name):
     """
     Returns a new configured MapProxy app and the timestamp of the configuration.
     """
     mapproxy_conf = self.loader.app_conf(proj_name)['mapproxy_conf']
     m_time = os.path.getmtime(mapproxy_conf)
     log.info('initializing project app %s with %s', proj_name, mapproxy_conf)
     app = make_mapproxy_wsgi_app(mapproxy_conf)
     return app, m_time
Esempio n. 3
0
 def create_app(self, proj_name):
     """
     Returns a new configured MapProxy app and a dict with the
     timestamps of all configuration files.
     """
     mapproxy_conf = self.loader.app_conf(proj_name)['mapproxy_conf']
     log.info('initializing project app %s with %s', proj_name,
              mapproxy_conf)
     app = make_mapproxy_wsgi_app(mapproxy_conf, debug=self.debug)
     return app, app.config_files
Esempio n. 4
0
 def create_app(self, proj_name):
     """
     Returns a new configured MapProxy app and the timestamp of the configuration.
     """
     mapproxy_conf = self.loader.app_conf(proj_name)['mapproxy_conf']
     m_time = os.path.getmtime(mapproxy_conf)
     log.info('initializing project app %s with %s', proj_name,
              mapproxy_conf)
     app = make_mapproxy_wsgi_app(mapproxy_conf)
     return app, m_time
Esempio n. 5
0
    def create_app(self, user, uuid):
        try:
            mapproxy_conf = self.config_cache.config(
                user, uuid, self.max_uuids_per_user)
        except RequestError:
            log.exception('unable to query config')
            return Response('service unavailable', status=503)

        if not mapproxy_conf:
            return Response('not found', status=404)

        log.debug('initializing project %s', mapproxy_conf)
        return make_mapproxy_wsgi_app(mapproxy_conf)
    def create_app(self, user, uuid):
        try:
            mapproxy_conf = self.config_cache.config(user, uuid,
                                                     self.max_uuids_per_user)
        except RequestError:
            log.exception('unable to query config')
            return Response('service unavailable', status=503)

        if not mapproxy_conf:
            return Response('not found', status=404)

        log.debug('initializing project %s', mapproxy_conf)
        return make_mapproxy_wsgi_app(mapproxy_conf)