提升效率并删除不必要的文件

This commit is contained in:
wzy-warehouse
2026-06-21 15:24:09 +08:00
parent e84aae3ea6
commit 95a74d00f3
24 changed files with 31 additions and 575 deletions
+2 -11
View File
@@ -115,18 +115,10 @@ def main():
qgs_app = QgsApplication([], False)
qgs_app.initQgis()
from app.services.qgis.map_service import MapService, template_cache
from app.services.qgis.template_modifier import TemplateModifier
from app.services.qgis.map_service import MapService
from app.config.qgis_mappings import build_static_layers_config, get_gpkg_dir
# 从磁盘恢复已缓存的模板
cached_count = template_cache.load_persistent_cache()
print(f"[qgis_daemon] QGIS 已启动, 磁盘缓存: {cached_count} 个模板",
file=sys.stderr, flush=True)
total_cached = len(template_cache._cache)
print(f"[qgis_daemon] 就绪: 缓存共{total_cached}个模板",
file=sys.stderr, flush=True)
print("[qgis_daemon] QGIS 已启动", file=sys.stderr, flush=True)
# ── 请求处理循环 ──
print("[qgis_daemon] 等待请求...", file=sys.stderr, flush=True)
@@ -197,7 +189,6 @@ def main():
# 清理
project = QgsProject.instance()
project.clear()
template_cache.cleanup()
print("[qgis_daemon] 已退出", file=sys.stderr, flush=True)