App Engine (python) skips webapp middleware (like Appstats) in production but works fine on dev server -
I am using an App Engine dragon to host an app and I prefer to use apps and some other libraries Middleware which is However, when I set up middleware through appagyn_config (as shown below) it works on dev server but not in production. Apestats and gesens work as a charm in the dev server and do not work at all in production. Here is my appenne_config, which is located in my root / SRC dir: session from com.impactpy.gaesessions. SessionMiddleware COOKIE_KEY = 'Try good def webapp_add_wsgi_middleware (app): google.appengine Ext.appstats recording app = Sessions Bee (app, cookie_key = COOKIE_KEY) app = recording. Appstats_wsgi_middleware (app) return app
Any ideas?
UPDATE
So I'm bringing this back up because I have not taken any advantage to reuse it. I removed the appengine_config.py: from the recording def webapp_add_wsgi_middleware (app) with google.appengine.ext.appstats: and include in app.yaml My app uses the original WebF, at the bottom of each request-handling file, including the following: deployment of work to fix. The app is getting stronger for more than a year and sees many requests. I Myapp.appspot.com/_ah/stats showing GUI with a fresh button, no data and message "A request has not yet been recorded" etc. is. I'm confused! Biltin: - Datastore_Adam: On - Remote_API: On-AppState: On
application = webapp.WSGIApplication (([('/ handler ', MyHandlerClass]], debug = true () main (): run_wsgi_app application) if __name__ == "__main__": main ()
I think the problem is how you import session machineware top level of your project directory Try putting gassation on.
Here is an appname_configuration
I used successfully:
session from google.appengine.ext.appstats Meldware import recording def webapp_add_wsgi_middleware (app): app = session-modelware (app, cookie_key = "s3cr3t") app = recording. Appstats_wsgi_middleware (app) returns app
Comments
Post a Comment