intranet.apps.emerg package¶
Submodules¶
intranet.apps.emerg.api module¶
intranet.apps.emerg.tasks module¶
intranet.apps.emerg.tests module¶
- class intranet.apps.emerg.tests.EmergTestCase(methodName='runTest')[source]¶
Bases:
IonTestCase
intranet.apps.emerg.views module¶
- intranet.apps.emerg.views.check_emerg()[source]¶
Fetch from FCPS and CSL emergency announcement pages.
URLs defined in settings.FCPS_EMERGENCY_PAGE and settings.CSL_STATUS_PAGE
Request timeout defined in settings.FCPS_EMERGENCY_TIMEOUT
- intranet.apps.emerg.views.get_emerg()[source]¶
Get the cached FCPS emergency page and CSL status 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.