Skip to content

Commit

Permalink
Merge pull request #447 from OpenHistoricalMap/imposm/views
Browse files Browse the repository at this point in the history
Clean the logs for refresh the views - imposm
  • Loading branch information
Rub21 authored Dec 24, 2024
2 parents bf19cd8 + e761975 commit 262bceb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions images/tiler-imposm/materialized_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,9 @@ def refresh_all_materialized_views(config_dict: dict):
continue
mview_name = "osm_" + mt_view.get("view")
if object_exists(mview_name):
logger.info("-"*40)
logger.info(f"Refreshing materialized view: {mview_name}")
query = f"REFRESH MATERIALIZED VIEW {mview_name};"
logger.info(query)
execute_psql_query(query)
logger.info(f"Refresh completed for {mview_name}")
else:
logger.warning(f"Materialized view {mview_name} not found. Skipping refresh.")

Expand All @@ -231,7 +228,7 @@ def main():
logger.info("Refreshing all materialized views...")
refresh_all_materialized_views(config_dict)
logger.info("All materialized views refreshed. Sleeping 60 seconds...")
time.sleep(30)
time.sleep(60)

if __name__ == "__main__":
main()
Expand Down

0 comments on commit 262bceb

Please sign in to comment.