refactor: use atomic file read/write for better performance

This commit is contained in:
2026-07-06 22:40:47 +08:00
parent 844d390017
commit b95a45496b
8 changed files with 262 additions and 356 deletions
+3
View File
@@ -93,6 +93,9 @@ class DeployConfig(ConfigModel):
logger.info(f"Rest of the configs are the same as default")
def read(self):
"""
Read and update deploy config, copy `self.configs` to properties.
"""
self.config = poor_yaml_read(DEPLOY_TEMPLATE)
self.config_template = copy.deepcopy(self.config)
origin = poor_yaml_read(self.file)