forked from mirrors/thatmattlove-hyperglass
log hyperglass version on startup
This commit is contained in:
parent
0525c66ce4
commit
b0dc32fa60
1 changed files with 13 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ from hyperglass.util import (
|
|||
build_frontend,
|
||||
clear_redis_cache,
|
||||
)
|
||||
from hyperglass.constants import MIN_PYTHON_VERSION
|
||||
from hyperglass.constants import MIN_PYTHON_VERSION, __version__
|
||||
from hyperglass.exceptions import HyperglassError
|
||||
from hyperglass.configuration import (
|
||||
URL_DEV,
|
||||
|
|
@ -22,6 +22,12 @@ from hyperglass.configuration import (
|
|||
)
|
||||
|
||||
|
||||
async def log_hyperglass_version():
|
||||
"""Log the hyperglass version on startup."""
|
||||
log.info(f"hyperglass version is {__version__}")
|
||||
return True
|
||||
|
||||
|
||||
async def check_python_version():
|
||||
"""Ensure Python version meets minimum requirement.
|
||||
|
||||
|
|
@ -85,5 +91,10 @@ async def clear_cache():
|
|||
pass
|
||||
|
||||
|
||||
on_startup = [check_python_version, check_redis_instance, build_ui]
|
||||
on_startup = [
|
||||
log_hyperglass_version,
|
||||
check_python_version,
|
||||
check_redis_instance,
|
||||
build_ui,
|
||||
]
|
||||
on_shutdown = [clear_cache]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue