X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/845c43137a603ac427c08700a31d3e2f9dff35c7..1c33cb3186a38ceb5cc4de0975ae1956c861f9b5:/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