Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

UT-Austin-FIS/db_outage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

DB Outage:

This application will detect an Oracle database outage, and will handle it gracefully by rendering a default error page.

Usage

To include this app in your PyPE project, simply pull it into your project via svn:externals.

path: extra/db_outage

URL: https://github.com/UT-Austin-FIS/db_outage/tags/v1.1.1/db_outage

Setup

  1. Add "db_outage" to your INSTALLED_APPS setting like this:

          INSTALLED_APPS = (
              # ...
              'db_outage',
              # ...
          )
  2. Add the db_outage middleware to your MIDDLEWARE_CLASSES in settings. It needs to be near the top, if not the very top of your middleware stack:

          MIDDLEWARE_CLASSES = (
              'db_outage.middleware.DBOutageMiddleware',
              # ...
          )
  3. Add DB_OUTAGE_CONTEXT to your settings. This should be a path to a class that carries the core of your page context logic. It will likely be subclass of the Django RequestContext object. IMPORTANT: The context object you supply MUST NOT require oracle database access.

       DB_OUTAGE_CONTEXT = 'path.to.your.desired.ContextObject'
  4. Add DB_OUTAGE_MESSAGE to your settings. This is a custom message that will be displayed when a database outage occurs:

    DB_OUTAGE_MESSAGE = (
        'The <your application name> system is currently unavailable. '
        'We are working to restore service.'
    )

Releases

  • v1.1.2 (2018/02/20)
    • Adding support for Django 1.11
  • v1.1.1 (2015/02/05)
    • Adding version info
  • v1.1 (2015/01/22)
    • Adding support for Django 1.7
  • v1.0 (2014/05/29)
    • initial release with support for at least:
      • Python 2.6 - 2.7
      • Django 1.4