Skip to content

Commit

Permalink
Write MapProxy config after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Aug 20, 2024
1 parent 10c58bc commit 1545415
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qsa-api/qsa_api/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def cache_reset(self) -> (bool, str):
layer.name(), bbox, epsg_code, t == Qgis.LayerType.Raster, None
)

mp.write()

return True, ""

return False, "Cache is disabled"
Expand Down Expand Up @@ -357,6 +359,11 @@ def remove(self) -> None:
for layer in self.layers:
self.remove_layer(layer)

# remove mapproxy config file
if self._mapproxy_enabled:
mp = QSAMapProxy(self.name)
mp.remove()

# remove qsa projects dir
shutil.rmtree(self._qgis_project_dir, ignore_errors=True)

Expand Down

0 comments on commit 1545415

Please sign in to comment.