From 4faefe156c0a57bae9dd7114ba9fa63ef312187e Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 1 Mar 2021 16:47:19 +0100 Subject: [PATCH] report software version of status call --- lib-php/website/status.php | 3 ++- nominatim/tools/refresh.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib-php/website/status.php b/lib-php/website/status.php index 9f030fb3..3bb2ffa1 100644 --- a/lib-php/website/status.php +++ b/lib-php/website/status.php @@ -37,7 +37,8 @@ if ($sOutputFormat == 'json') { $aResponse = array( 'status' => 0, 'message' => 'OK', - 'data_updated' => (new DateTime('@'.$epoch))->format(DateTime::RFC3339) + 'data_updated' => (new DateTime('@'.$epoch))->format(DateTime::RFC3339), + 'software_version' => CONST_NominatimVersion ); javascript_renderData($aResponse); } else { diff --git a/nominatim/tools/refresh.py b/nominatim/tools/refresh.py index b59c37bf..5cfa1ab0 100644 --- a/nominatim/tools/refresh.py +++ b/nominatim/tools/refresh.py @@ -9,6 +9,7 @@ from textwrap import dedent from psycopg2.extras import execute_values from ..db.utils import execute_file +from ..version import NOMINATIM_VERSION LOG = logging.getLogger() @@ -258,9 +259,10 @@ def setup_website(basedir, phplib_dir, config):