fix: 定时任务刷新cookie问题 #103 (#104)

Co-authored-by: willow <willow@163.com>
This commit is contained in:
willow-yang 2025-06-02 23:12:00 +08:00 committed by GitHub
parent 3fb2718cdf
commit ee4af7d06b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View File

@ -31,6 +31,7 @@ config.yml
# VSCode # VSCode
.history .history
.idea
# Vim # Vim
*.swp *.swp

View File

@ -283,12 +283,18 @@ def write_config(key, value):
keys = key.split(".") keys = key.split(".")
current = config current = config
current_cache = variable.config
for k in keys[:-1]: for k in keys[:-1]:
if k not in current: if k not in current:
current[k] = {} current[k] = {}
current = current[k] current = current[k]
if k not in current_cache:
current_cache[k] = {}
current_cache = current_cache[k]
current[keys[-1]] = value current[keys[-1]] = value
# 更新配置缓存
current_cache[keys[-1]] = value
# 设置保留注释和空行的参数 # 设置保留注释和空行的参数
y = yaml_.YAML() y = yaml_.YAML()