1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

15 lines
251 B
Python
Raw Normal View History

2020-01-21 17:27:57 -07:00
"""API Events."""
2020-04-16 00:27:00 -07:00
# Project
2021-09-15 00:57:45 -07:00
from hyperglass.state import use_state
2020-04-16 00:27:00 -07:00
def check_redis() -> None:
"""Ensure Redis is running before starting server."""
cache = use_state("cache")
cache.check()
2020-04-16 00:27:00 -07:00
on_startup = (check_redis,)
2020-04-16 00:27:00 -07:00
on_shutdown = ()