mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
log hyperglass version on startup
This commit is contained in:
@ -10,7 +10,7 @@ from hyperglass.util import (
|
|||||||
build_frontend,
|
build_frontend,
|
||||||
clear_redis_cache,
|
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.exceptions import HyperglassError
|
||||||
from hyperglass.configuration import (
|
from hyperglass.configuration import (
|
||||||
URL_DEV,
|
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():
|
async def check_python_version():
|
||||||
"""Ensure Python version meets minimum requirement.
|
"""Ensure Python version meets minimum requirement.
|
||||||
|
|
||||||
@ -85,5 +91,10 @@ async def clear_cache():
|
|||||||
pass
|
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]
|
on_shutdown = [clear_cache]
|
||||||
|
Reference in New Issue
Block a user