refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -1,9 +1,9 @@
|
||||
// 身份识别重评(ID-2):匹配规则更新后,处理存量的待识别事项与错误映射。默认只读(dry-run),加 --apply 才改库。
|
||||
//
|
||||
// 用法(DATABASE_URL 必须显式给出,脚本不带默认库):
|
||||
// DATABASE_URL=postgres://umt:***@<host>:5432/umt deno run -A scripts/identity-reevaluate.ts
|
||||
// DATABASE_URL=… deno run -A scripts/identity-reevaluate.ts --rollback-wrong # 另查分类词别名造成的错误映射
|
||||
// DATABASE_URL=… deno run -A scripts/identity-reevaluate.ts --rollback-wrong --apply # 真正执行
|
||||
// DATABASE_URL=postgres://umt:***@<host>:5432/umt bun scripts/identity-reevaluate.ts
|
||||
// DATABASE_URL=… bun scripts/identity-reevaluate.ts --rollback-wrong # 另查分类词别名造成的错误映射
|
||||
// DATABASE_URL=… bun scripts/identity-reevaluate.ts --rollback-wrong --apply # 真正执行
|
||||
//
|
||||
// 1. open 的 identity_ambiguous:按新解析规则重新解析每个成员资源并给出预估(只用池里存的候选,不查 TMDB);
|
||||
// --apply 时把这些池条目的 next_review_at 置为现在、attempts 清零,由运行中的服务(已部署新规则)的池复查
|
||||
@@ -25,13 +25,13 @@ import {
|
||||
} from "@umt/domain";
|
||||
import pg from "pg";
|
||||
|
||||
const args = new Set(Deno.args);
|
||||
const args = new Set(process.argv.slice(2));
|
||||
const APPLY = args.has("--apply");
|
||||
const ROLLBACK = args.has("--rollback-wrong");
|
||||
const url = Deno.env.get("DATABASE_URL");
|
||||
const url = process.env.DATABASE_URL;
|
||||
if (!url) {
|
||||
console.error("需要 DATABASE_URL(脚本不带默认库)");
|
||||
Deno.exit(2);
|
||||
process.exit(2);
|
||||
}
|
||||
const db = new pg.Client({ connectionString: url });
|
||||
await db.connect();
|
||||
|
||||
Reference in new issue
Block a user