mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-22 07:32:00 +00:00
「需要剖析」多认一种:上次剖析之后多出了码值、日期检查(new_checks);停止排队任务时不再读过期的 job(起草、剖析两处)
- 以前只认从没剖析过、上次没做完、又冒出了待核实关系三种:上次剖析时没有可剖析的项(指定了表、记为跳过),后来有人把一列 记成状态类,或者日期列变了,「需要剖析的表」永远漏掉它。现在按当前要做的检查对上次剖析的检查项(kind、target),多出了 码值、日期检查就要剖析,原因 new_checks;上次是空表而跳过的仍不算(不发查询不知道有没有数据),界面和 409 的说法写明。 due_reason 改收 plan_checks 列出的检查,没人用的 profile_checks 去掉。 - 停止一个排队中的任务时,排队那一步没停成(刚被后台认领)要回滚,回滚让读到的 job 属性全部过期,再读 job.id 就在异步会话里 同步加载(MissingGreenlet),接口 500。起草的 cancel 在 main 上就是这样写的,剖析照抄了;两处都先把 id、状态取出来。 新测试在旧代码上复现了这个 500。
This commit is contained in:
@@ -175,8 +175,9 @@ def _summary_row(name: str, meta: dict[str, Any] | None, entry: catalog.CatalogE
|
||||
def _profiling(name: str, meta: dict[str, Any] | None, entry: catalog.CatalogEntry | None, *,
|
||||
tables: dict[str, Any], masked: set[str], last: dict[str, Any] | None) -> dict[str, Any]:
|
||||
notes = entry.notes if entry else {}
|
||||
checks = catalog_profile.profile_checks(name, meta, notes, tables=tables, masked=masked)
|
||||
reason = catalog_profile_jobs.due_reason(meta, notes, last, checks)
|
||||
planned = catalog_profile.plan_checks(name, meta, notes, tables=tables, masked=masked)
|
||||
checks = sum(1 for c in planned if c.skip is None)
|
||||
reason = catalog_profile_jobs.due_reason(meta, notes, last, planned)
|
||||
return {"last_profile": catalog_profile_jobs.public_last(last), "profile_due": reason is not None,
|
||||
"profile_due_reason": reason, "profile_checks": checks}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user