X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5e477e3b5b99da6fc4e54749d4671a6fc8fdcd66..9fa73cfb1528147cc0b59d81b5c0cb1a9ed6789d:/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