rustprooflabs / pgosm-flex

PgOSM Flex provides high quality OpenStreetMap datasets in PostGIS (Postgres) using the osm2pgsql Flex output.
MIT License
100 stars 20 forks source link

Fix uncaught error when data too old for replication update #392

Closed rustprooflabs closed 2 months ago

rustprooflabs commented 2 months ago

Closes #391.

Error in main output

2024-07-06 08:22:26,658:INFO:pgosm-flex:helpers:2024-07-06 08:22:26 [INFO]: Using replication service 'http://download.geofabrik.de/north-america/us/district-of-columbia-updates'.
2024-07-06 08:22:27,940:INFO:pgosm-flex:helpers:2024-07-06 08:22:27 [ERROR]: Error during diff download. Bailing out.
2024-07-06 08:22:27,940:ERROR:pgosm-flex:helpers:Data in database is too far behind replication service.
2024-07-06 08:22:27,965:WARNING:pgosm-flex:pgosm_flex:Failure. Return code: 999
2024-07-06 08:22:27,994:WARNING:pgosm-flex:pgosm_flex:PgOSM Flex completed with errors. Details in output
PgOSM Flex completed with errors. Details in output

Reports as failure in DB

imported                     |osm_date  |pgosm_flex_version|import_status|
-----------------------------+----------+------------------+-------------+
2024-07-06 07:43:33.196 -0600|2024-07-06|1.0.1-e53f4cf     |Failed       |
2024-07-06 07:41:27.535 -0600|2024-07-06|1.0.1-e53f4cf     |Completed    |