예제 #1
0
파일: main.py 프로젝트: FareesHussain/oppia
 def __call__(self, environ: Dict[str, str],
              start_response: webapp2.Response) -> Any:
     global_cache = datastore_services.RedisCache(
         cache_services.CLOUD_NDB_REDIS_CLIENT
     )  # type: ignore[attr-defined]
     with datastore_services.get_ndb_context(global_cache=global_cache):
         return self.wsgi_app(environ, start_response)
예제 #2
0
파일: main.py 프로젝트: jameesjohn/oppia
 def __call__(self, environ: Dict[str, str],
              start_response: webapp2.Response) -> webapp2.Response:
     global_cache = datastore_services.RedisCache(
         cache_services.CLOUD_NDB_REDIS_CLIENT
     )  # type: ignore[attr-defined]
     with datastore_services.get_ndb_context(global_cache=global_cache):
         # Cast is needed since webapp2.WSGIApplication is not
         # correctly typed.
         return cast(webapp2.Response,
                     self.wsgi_app(environ, start_response))