feat(appbase): params 加 register_open 参数 + 默认值首次插入不覆盖(保留 superuser 运行时修改)

This commit is contained in:
yumoqing 2026-08-21 19:19:17 +08:00
parent 6ce55f6482
commit b2d07ce247

View File

@ -40,6 +40,7 @@ CREATE TABLE IF NOT EXISTS params (
_PARAMS_INIT = [
("workspace_base", "/d/pipeline/workspaces"),
("task_max_retry", "3"),
("register_open", "1"),
]
# sd_features 功能/需求表 DDL手写避开 json2ddl 的 DEFAULT ''N'' bug索引内联避免重复建 Duplicate key name
@ -226,7 +227,7 @@ async def main():
await sor.execute(
"INSERT INTO params (id, params_name, params_value) "
"VALUES (${id}$, ${n}$, ${v}$) "
"ON DUPLICATE KEY UPDATE params_value=${v}$",
"ON DUPLICATE KEY UPDATE params_name=params_name",
{"id": pname, "n": pname, "v": pval})
print(' tables: appbase params ensured (workspace_base)')
except Exception as e: