feat(timer): syncConfig concurrency 不变量与控制器 cap 防御

TimerServiceBase syncConfig 不覆盖 DB concurrency(NULL=继承代码默认)。TimerControllerBase cap 改 >= 语义,放行 concurrency_id < cap 的 0-indexed 分片。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
augushong
2026-07-25 21:57:39 +08:00
parent f478ae0e4e
commit 3db3f7de78
2 changed files with 16 additions and 1 deletions

View File

@@ -13,6 +13,11 @@ class TimerServiceBase
/**
* 将配置文件中的定时任务同步到数据库.
* 仅新增不存在的记录,标记孤立记录,不覆盖 run_type/status.
*
* concurrency 不变量DB 为准):
* - 新建行不写 concurrency列 nullable 自然得 NULLNULL = 继承代码 config 默认值);
* - 已有行即便 config 中 concurrency 变化也不覆盖(以 UI/DB 显式配置为准)。
* config 的 concurrency 仅作为代码默认供 NULL 行继承,永不在此同步写入 DB。
*/
public static function syncConfigToDatabase(): void
{