X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e9efef90954cba09fdba3e556e9efff75540071c..e7b8e1a2c2d82f3f31f033df17adc5d14bbc5374:/nominatim/tools/admin.py diff --git a/nominatim/tools/admin.py b/nominatim/tools/admin.py index f27d9bbc..c37d0811 100644 --- a/nominatim/tools/admin.py +++ b/nominatim/tools/admin.py @@ -90,12 +90,9 @@ def analyse_indexing(config: Configuration, osm_id: Optional[str] = None, print(msg) -def clean_deleted_relations(config: Configuration, age: Optional[str] = None) -> None: +def clean_deleted_relations(config: Configuration, age: str) -> None: """ Clean deleted relations older than a given age """ - if not age: - LOG.fatal('No age given to delete relations') - raise UsageError('Age parameter not found') with connect(config.get_libpq_dsn()) as conn: with conn.cursor() as cur: try: @@ -107,4 +104,3 @@ def clean_deleted_relations(config: Configuration, age: Optional[str] = None) -> except DataError as exc: raise UsageError('Invalid PostgreSQL time interval format') from exc conn.commit() - \ No newline at end of file