Commits

Pior Bastida  committed 70fe3e4

Change setting key for healthcheck.disablefile

  • Participants
  • Parent commits ddbe84e

Comments (0)

Files changed (4)

 =====================
 
 
-health.maintenance.file ::
+healthcheck.disablefile ::
 
    Enable maintenance mode depending on the existance of a file.
    In maintenance mode, the health view responds with a 503 HTTP code.

File pyramid_health/tests.py

     maxDiff = None
 
     def setUp(self):
-        settings = {'health.maintenance.file': '/maintenance/file/test'}
+        settings = {'healthcheck.disablefile': '/maintenance/file/test'}
         config = Configurator(settings=settings)
         config.include('pyramid_health')
         self.app = webtest.TestApp(config.make_wsgi_app())

File pyramid_health/views.py

     """
     settings = request.registry.settings
 
-    if 'health.maintenance.file' in settings:
-        if os.path.exists(settings['health.maintenance.file']):
+    if 'healthcheck.disablefile' in settings:
+        if os.path.exists(settings['healthcheck.disablefile']):
             return HTTPServiceUnavailable()
 
     return Response('OK', content_type='text/plain')
 [metadata]
 name = pyramid_health
-version = 0.2.11
+version = 0.3.0
 summary = Pyramid health
 description-file = README.txt
-requires-dist = 
+requires-dist =
 	pyramid
 
 [files]
-packages = 
+packages =
 	pyramid_health
 
 [noah]