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
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
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)