diff --git a/hyperglass/api/events.py b/hyperglass/api/events.py index 2ba3d82..37d08df 100644 --- a/hyperglass/api/events.py +++ b/hyperglass/api/events.py @@ -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]