views

Functions

intranet.apps.emerg.views.check_emerg()[source]

Fetch from FCPS emergency announcement pages.

URLs defined in settings.FCPS_EMERGENCY_PAGE

Request timeout defined in settings.FCPS_EMERGENCY_TIMEOUT

intranet.apps.emerg.views.get_csl_status() Tuple[str, bool][source]

Get the cached status of the TJCSL status page.

Returns:

Tuple with a string consisting of the aggregate status of the TJ computer systems lab and a bool indicating whether the status cache was updated

The string of the tuple will be one of the following: “error” (parse error), “operational”, “downtime”, “degraded”, “maintenance”

intranet.apps.emerg.views.get_emerg()[source]

Get the cached FCPS emergency page, or check it again.

Timeout defined in settings.CACHE_AGE[“emerg”]

intranet.apps.emerg.views.get_emerg_result(*, custom_logger=None)[source]

Run the fetch command from FCPS.

intranet.apps.emerg.views.update_emerg_cache(*, custom_logger=None) None[source]

Updates the cached contents of FCPS emergency page.

This forces a cache update, regardless of whether or not the cache has expired. However, it does set the cache entry to expire in settings.CACHE_AGE["emerg"] seconds.

Parameters:

custom_logger – A custom logging.Logger instance to use for log messages relating to the cache update.