1. ken cochrane
  2. pypi-appengine

Commits

Brett Cannon  committed 33c7942
  • Participants
  • Parent commits 608e9e4
  • Branches default

Comments (0)

Files changed (3)

File 404.py

View file
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp.util import run_wsgi_app
+
+class NotFoundPageHandler(webapp.RequestHandler):
+    def get(self):
+        self.error(404)
+        self.response.out.write('b.pypi.python.org has been turned down; PyPI itself is now backed by a CDN and thus this mirror is no longer needed')
+
+application = webapp.WSGIApplication([('/.*', NotFoundPageHandler)],
+                                     debug=True)
+
+def main():
+    run_wsgi_app(application)
+
+if __name__ == "__main__":
+    main()

File app.yaml

View file
 application: pypi
-version: 3
+version: 4
 runtime: python
 api_version: 1
 
 - datastore_admin: on
 
 handlers:
-- url: /cron
-  script: mirror.py
-  login: admin
+- url: .*
+  script: 404.py
 
-- url: /daily
-  script: mirror.py
-  login: admin
-
-- url: .*
-  script: mirror.py
-

File cron.yaml

View file
 cron:
-- description: check for updates
-  url: /cron
-  schedule: every 5 minutes
-- description: daily summary job
-  url: /daily
-  schedule: every 24 hours