Restart-when: a published @objectstack/plugin-security > 17.4.0 that this repo can pin carries objectstack-ai/objectstack@2266438ce0 (PR #17872, fixing #17628) — probe the tarball for the app:seeded re-run of claimSeedOwnership, not the issue state
现象(生产实测;租户信息已匿名)
一个装有 HotCRM 的生产租户,sys_job:
| job |
cron |
13 天运行次数 |
平均耗时 |
最长耗时 |
flow-schedule:demo_bootstrap |
*/10 * * * * |
1,776 |
3.4 s |
1,568,985 ms(26 分钟) |
另有 2 次自该租户首次开机起一直停在 running。
demo_bootstrap 每次对 12 个 crm_* 对象各做一次 owner_id IS NULL 过滤(limit 500)再逐条认领。首轮之后每次都是空操作:sys_automation_run 保留的 100 次运行里 selected 合计 100、acted 0。
为什么要紧
- 一个「自举」流以永久 10 分钟 cron 的形式存在,在每个装了 HotCRM 的租户里无限期发语句
- 在远程 Turso 租户库上(框架侧已知缺索引问题),这 12 条过滤每条都是全表扫描
- 同一租户里有 12 个流以
channels: ['inbox', 'email'] 通知;未配置邮件的租户,每条通知都产生一条必死的 email 投递行。框架侧会另外处理渠道可用性,这里先知情
建议
demo_bootstrap 改为一次性:安装 / seed 完成时触发一次,或自检到 ownerless 记录归零后自我停用——不再是常驻 cron
- 框架对「未配置渠道」的裁决落地后,评估这 12 个 notify 节点是否要把 email 设为可选
验收
- 新装租户:
demo_bootstrap 至多运行到 ownerless 记录归零为止;sys_job 中不再保留常驻的 */10 调度
test/flow-scheduled*.test.ts 相应更新并通过
Generated by Claude Code
Restart-when: a published @objectstack/plugin-security > 17.4.0 that this repo can pin carries objectstack-ai/objectstack@2266438ce0 (PR #17872, fixing #17628) — probe the tarball for the app:seeded re-run of claimSeedOwnership, not the issue state
现象(生产实测;租户信息已匿名)
一个装有 HotCRM 的生产租户,
sys_job:flow-schedule:demo_bootstrap*/10 * * * *另有 2 次自该租户首次开机起一直停在
running。demo_bootstrap每次对 12 个crm_*对象各做一次owner_id IS NULL过滤(limit 500)再逐条认领。首轮之后每次都是空操作:sys_automation_run保留的 100 次运行里 selected 合计 100、acted 0。为什么要紧
channels: ['inbox', 'email']通知;未配置邮件的租户,每条通知都产生一条必死的 email 投递行。框架侧会另外处理渠道可用性,这里先知情建议
demo_bootstrap改为一次性:安装 / seed 完成时触发一次,或自检到 ownerless 记录归零后自我停用——不再是常驻 cron验收
demo_bootstrap至多运行到 ownerless 记录归零为止;sys_job中不再保留常驻的*/10调度test/flow-scheduled*.test.ts相应更新并通过Generated by Claude Code