Skip to content

Commit

Permalink
Merge pull request #452 from OpenHistoricalMap/prod/mv
Browse files Browse the repository at this point in the history
Update range time to update materialized views
  • Loading branch information
Rub21 authored Dec 29, 2024
2 parents bba1ad8 + cb39a07 commit e1caffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/tiler-imposm/materialized_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

PSQL_CONN = f"postgresql://{DB_CONFIG['user']}:{DB_CONFIG['password']}@{DB_CONFIG['host']}:{DB_CONFIG['port']}/{DB_CONFIG['dbname']}"


REFRESH_MATERIALIZED_VIEWS_TIME= int(os.getenv("REFRESH_MATERIALIZED_VIEWS_TIME", 300))
# ------------------------------------------------------------------------------
# HELPER FUNCTIONS
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -231,7 +231,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(60)
time.sleep(REFRESH_MATERIALIZED_VIEWS_TIME)


if __name__ == "__main__":
Expand Down

0 comments on commit e1caffa

Please sign in to comment.