1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/maintenance.py.md
Stefan Pratter 3ee0d1ea5e Support 202205 (#1188)
* Add "Last login" to https://peeringdb.com/cp/peeringdb_server/user/ #879

* Bug in renumbering tool #660

* Add the IX name and id to IX-F Import Emails #963

* Use username to create deskpro person when no first-name / last-name data exists #1057

* Organization merge tool usergroup issues #930

* Exempt superusers (PeeringDB Admin Committee & Operations Committee admins) from throttling #1172

* add missing migration for #1172

* linting

* poetry relock

* adapt to django-two-factor-auth template-tag renaming changes

* increase default for DATA_QUALITY_MAX_SPEED to 5Tb

* regenerate docs

* fix api test for netixlan max speed validation

* pdb_api_cache command needs to disable CSRF_USE_SESSIONS before it runs

Co-authored-by: David Poarch <dpoarch@20c.com>
2022-06-15 07:23:26 -05:00

1.2 KiB

Generated from maintenance.py on 2022-06-14 09:38:55.484251

peeringdb_server.maintenance

Django middleware to handle maintenance mode.

Functions


active

def active()

Return True if maintenance mode is currently active.


off

def off()

Turn maintenance mode off.


on

def on(timeout=None)

Turn maintenance mode on.

Keyword Arguments:

- timeout<int=None>: if specified will automatically
    end maintenance mode after n seconds

raise_if_active

def raise_if_active()

Raise ActionBlocked exception if maintenance mode is active.


Classes


ActionBlocked

ActionBlocked(builtins.Exception)

Common base class for all non-exit exceptions.

Methods

_init_

def __init__(self)

Initialize self. See help(type(self)) for accurate signature.


Middleware

Middleware(builtins.object)

Middleware will return 503 json responses for all write ops (POST PUT PATCH DELETE).

Methods

_call_

def __call__(self, request)

Call self as a function.


_init_

def __init__(self, get_response=None)

Initialize self. See help(type(self)) for accurate signature.