X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/845c43137a603ac427c08700a31d3e2f9dff35c7..bdded69ab636ab8e3bb46322ebbe4d2f9ec41614:/nominatim/tools/freeze.py diff --git a/nominatim/tools/freeze.py b/nominatim/tools/freeze.py index 39c3279d..602def55 100644 --- a/nominatim/tools/freeze.py +++ b/nominatim/tools/freeze.py @@ -50,3 +50,9 @@ def drop_flatnode_file(fpath: Optional[Path]) -> None: """ if fpath and fpath.exists(): fpath.unlink() + +def is_frozen(conn: Connection) -> bool: + """ Returns true if database is in a frozen state + """ + + return conn.table_exists('place') is False