Skip to content

Commit

Permalink
Add Refresh materialized views
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed May 11, 2024
1 parent dcff635 commit 5140133
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions qgepqwat2ili/qgepdss/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3819,3 +3819,22 @@ def overflow_common(row):
logger.info("symbology triggers successfully created!")
post_session.commit()
post_session.close()

#11.5.2024 add post_session2 - to do add queries for main_cover and main_node as in TEKSI, add to symbology functions? or extra create sql?
# see teksi ww https://github.com/teksi/wastewater/blob/3acfba249866d299f8a22e249d9f1e475fe7b88d/datamodel/app/symbology_functions.sql#L290

post_session2 = Session(utils.sqlalchemy.create_engine(), autocommit=False, autoflush=False)

# logger.info("Update wastewater structure fk_main_cover")
# cursor.execute("SELECT tww_app.wastewater_structure_update_fk_main_cover('', True);")

# logger.info("Update wastewater structure fk_main_wastewater_node")
# cursor.execute(
# "SELECT tww_app.wastewater_structure_update_fk_main_wastewater_node('', True);"
# )

logger.info("Refresh materialized views")
cursor.execute("SELECT qgep_network.refresh_network_simple();")

post_session2.commit()
post_session2.close()

0 comments on commit 5140133

Please sign in to comment.