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