@faapi/task-pgboss 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -7,27 +7,6 @@ import PgBoss from 'pg-boss';
7
7
  * 常用:`connectionString`;其余见 pg-boss 文档(ConstructorOptions)。
8
8
  */
9
9
  type PgBossDriverOptions = PgBoss.ConstructorOptions;
10
- /**
11
- * faapi 任务队列 pg-boss 驱动(PostgreSQL 持久化队列)
12
- *
13
- * 与 faapi 主包 `config.task.driver: 'pgboss'` 配合使用:
14
- *
15
- * ```ts
16
- * // faapi.config.ts
17
- * export default {
18
- * task: {
19
- * driver: 'pgboss',
20
- * pgboss: { connectionString: 'postgres://localhost:5432/app' },
21
- * },
22
- * } satisfies FaapiConfig;
23
- * ```
24
- *
25
- * 语义映射(详见包根 README):
26
- * - `enqueue` → `boss.send(name, payload, { retryLimit, retryDelay, retryBackoff, startAfter })`
27
- * - `startWorker` → `boss.work(name, { batchSize: concurrency, includeMetadata: true }, handler)`
28
- * - `stop` → `offWork` + `boss.stop({ close: true, graceful: true, timeout })`
29
- * - 重试 → pg-boss 侧执行(retryLimit + retryBackoff 指数退避)
30
- */
31
10
  declare function createPgBossDriver(options?: PgBossDriverOptions): TaskDriver;
32
11
 
33
12
  export { type PgBossDriverOptions, createPgBossDriver };
package/dist/index.js CHANGED
@@ -1,9 +1,23 @@
1
1
  // src/index.ts
2
+ import { createHash } from "crypto";
2
3
  import PgBoss from "pg-boss";
4
+ function dedupIdToUuid(dedupId) {
5
+ const h = createHash("sha1").update(dedupId).digest("hex");
6
+ return [
7
+ h.slice(0, 8),
8
+ h.slice(8, 12),
9
+ `5${h.slice(13, 16)}`,
10
+ // version 5
11
+ `${(parseInt(h.slice(16, 17), 16) & 3 | 8).toString(16)}${h.slice(17, 20)}`,
12
+ // variant
13
+ h.slice(20, 32)
14
+ ].join("-");
15
+ }
3
16
  function createPgBossDriver(options = {}) {
4
17
  let boss = null;
5
18
  let stopped = false;
6
19
  const workerIds = /* @__PURE__ */ new Map();
20
+ const inflight = /* @__PURE__ */ new Map();
7
21
  async function ensureBoss() {
8
22
  if (!boss) {
9
23
  boss = new PgBoss(options);
@@ -22,10 +36,14 @@ function createPgBossDriver(options = {}) {
22
36
  retryDelay: 1,
23
37
  // 秒;配合 retryBackoff 指数退避
24
38
  retryBackoff: true,
39
+ ...opts?.dedupId ? { id: dedupIdToUuid(opts.dedupId) } : {},
25
40
  ...opts?.delayMs ? { startAfter: new Date(Date.now() + opts.delayMs) } : {}
26
41
  };
27
42
  const id = await b.send(name, payload, sendOptions);
28
43
  if (!id) {
44
+ if (opts?.dedupId) {
45
+ return dedupIdToUuid(opts.dedupId);
46
+ }
29
47
  throw new Error(`[faapi] pg-boss send failed for task "${name}"`);
30
48
  }
31
49
  return id;
@@ -43,14 +61,19 @@ function createPgBossDriver(options = {}) {
43
61
  async (jobs) => {
44
62
  for (const job of jobs) {
45
63
  const attempt = job.retryCount + 1;
46
- await process({
47
- id: job.id,
48
- name,
49
- payload: job.data,
50
- attempt,
51
- signal: new AbortController().signal
52
- // pg-boss 不提供执行中任务的取消信号
53
- });
64
+ const controller = new AbortController();
65
+ inflight.set(job.id, controller);
66
+ try {
67
+ await process({
68
+ id: job.id,
69
+ name,
70
+ payload: job.data,
71
+ attempt,
72
+ signal: controller.signal
73
+ });
74
+ } finally {
75
+ inflight.delete(job.id);
76
+ }
54
77
  }
55
78
  }
56
79
  );
@@ -58,15 +81,24 @@ function createPgBossDriver(options = {}) {
58
81
  },
59
82
  async stop(timeoutMs = 1e4) {
60
83
  stopped = true;
61
- const b = boss;
62
- if (b) {
63
- for (const workerId of workerIds.values()) {
64
- await b.offWork(workerId).catch(() => {
65
- });
84
+ const abortTimer = setTimeout(() => {
85
+ for (const controller of inflight.values()) controller.abort();
86
+ }, timeoutMs);
87
+ try {
88
+ const b = boss;
89
+ if (b) {
90
+ for (const workerId of workerIds.values()) {
91
+ await b.offWork(workerId).catch(() => {
92
+ });
93
+ }
94
+ workerIds.clear();
95
+ await b.stop({ close: true, graceful: true, timeout: Math.floor(timeoutMs / 1e3) });
96
+ boss = null;
66
97
  }
67
- workerIds.clear();
68
- await b.stop({ close: true, graceful: true, timeout: Math.floor(timeoutMs / 1e3) });
69
- boss = null;
98
+ } finally {
99
+ clearTimeout(abortTimer);
100
+ for (const controller of inflight.values()) controller.abort();
101
+ inflight.clear();
70
102
  }
71
103
  },
72
104
  async stopWorkers() {
@@ -78,7 +110,27 @@ function createPgBossDriver(options = {}) {
78
110
  }
79
111
  }
80
112
  workerIds.clear();
113
+ },
114
+ async cancel(name, id) {
115
+ if (stopped) {
116
+ throw new Error(
117
+ "[faapi] Task queue is stopped and no longer accepts management operations"
118
+ );
119
+ }
120
+ const b = await ensureBoss();
121
+ await b.cancel(name, id);
122
+ },
123
+ async retry(name, id) {
124
+ if (stopped) {
125
+ throw new Error(
126
+ "[faapi] Task queue is stopped and no longer accepts management operations"
127
+ );
128
+ }
129
+ const b = await ensureBoss();
130
+ await b.resume(name, id);
81
131
  }
132
+ // list 未实现:pg-boss v10 无批量列出 jobs 的公开 API(getJobById/getQueueSize 只能单查/计数),
133
+ // 不硬造内部 SQL 依赖——语义层 listQueued 显式抛错,管理走 pg-boss 自身 API/SQL
82
134
  };
83
135
  }
84
136
  export {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { TaskDriver, TaskDriverProcess } from '@faapi/faapi';\nimport PgBoss from 'pg-boss';\n\n/**\n * pg-boss 驱动选项(透传给 PgBoss 构造函数)\n *\n * 常用:`connectionString`;其余见 pg-boss 文档(ConstructorOptions)。\n */\nexport type PgBossDriverOptions = PgBoss.ConstructorOptions;\n\n/**\n * faapi 任务队列 pg-boss 驱动(PostgreSQL 持久化队列)\n *\n * 与 faapi 主包 `config.task.driver: 'pgboss'` 配合使用:\n *\n * ```ts\n * // faapi.config.ts\n * export default {\n * task: {\n * driver: 'pgboss',\n * pgboss: { connectionString: 'postgres://localhost:5432/app' },\n * },\n * } satisfies FaapiConfig;\n * ```\n *\n * 语义映射(详见包根 README):\n * - `enqueue` → `boss.send(name, payload, { retryLimit, retryDelay, retryBackoff, startAfter })`\n * - `startWorker` → `boss.work(name, { batchSize: concurrency, includeMetadata: true }, handler)`\n * - `stop` → `offWork` + `boss.stop({ close: true, graceful: true, timeout })`\n * - 重试 → pg-boss 侧执行(retryLimit + retryBackoff 指数退避)\n */\nexport function createPgBossDriver(options: PgBossDriverOptions = {}): TaskDriver {\n let boss: PgBoss | null = null;\n let stopped = false;\n /** 已创建的 pg-boss worker id(stopWorkers 时 offWork) */\n const workerIds = new Map<string, string>();\n\n async function ensureBoss(): Promise<PgBoss> {\n if (!boss) {\n boss = new PgBoss(options);\n // pg-boss 惰性连接:start 后才连库;驱动在首次 enqueue/startWorker 前建立\n await boss.start();\n }\n return boss;\n }\n\n return {\n async enqueue(name, payload, opts) {\n if (stopped) {\n throw new Error('[faapi] Task queue is stopped and no longer accepts jobs');\n }\n const b = await ensureBoss();\n const sendOptions: PgBoss.SendOptions = {\n retryLimit: opts?.retries ?? 0,\n retryDelay: 1, // 秒;配合 retryBackoff 指数退避\n retryBackoff: true,\n ...(opts?.delayMs ? { startAfter: new Date(Date.now() + opts.delayMs) } : {}),\n };\n // pg-boss data 形参为 object——基础类型 payload(cron 空任务等)按 JSON 语义透传\n const id = await b.send(name, payload as object, sendOptions);\n if (!id) {\n throw new Error(`[faapi] pg-boss send failed for task \"${name}\"`);\n }\n return id;\n },\n\n async startWorker(name, workerOpts) {\n const b = await ensureBoss();\n const process: TaskDriverProcess = workerOpts.process;\n // 二次注册(reload 场景)先 offWork 旧 worker\n const existing = workerIds.get(name);\n if (existing) {\n await b.offWork(existing);\n }\n const workerId = await b.work<unknown>(\n name,\n { batchSize: workerOpts.concurrency, includeMetadata: true },\n async (jobs) => {\n for (const job of jobs) {\n // retryCount 从 0 起(首次执行为 0)→ faapi attempt 从 1 起\n const attempt = job.retryCount + 1;\n await process({\n id: job.id,\n name,\n payload: job.data,\n attempt,\n signal: new AbortController().signal, // pg-boss 不提供执行中任务的取消信号\n });\n }\n // handler 正常返回 = 本批全部完成;抛错 = 整批失败由 pg-boss 按 retryLimit 重试\n },\n );\n workerIds.set(name, workerId);\n },\n\n async stop(timeoutMs = 10_000) {\n stopped = true;\n const b = boss;\n if (b) {\n for (const workerId of workerIds.values()) {\n await b.offWork(workerId).catch(() => {});\n }\n workerIds.clear();\n // graceful: 等 in-flight 任务完成;timeout 秒后强制处置\n await b.stop({ close: true, graceful: true, timeout: Math.floor(timeoutMs / 1000) });\n boss = null;\n }\n },\n\n async stopWorkers() {\n const b = boss;\n if (b) {\n for (const workerId of workerIds.values()) {\n await b.offWork(workerId).catch(() => {});\n }\n }\n workerIds.clear();\n },\n };\n}\n"],"mappings":";AACA,OAAO,YAAY;AA8BZ,SAAS,mBAAmB,UAA+B,CAAC,GAAe;AAChF,MAAI,OAAsB;AAC1B,MAAI,UAAU;AAEd,QAAM,YAAY,oBAAI,IAAoB;AAE1C,iBAAe,aAA8B;AAC3C,QAAI,CAAC,MAAM;AACT,aAAO,IAAI,OAAO,OAAO;AAEzB,YAAM,KAAK,MAAM;AAAA,IACnB;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,MAAM,QAAQ,MAAM,SAAS,MAAM;AACjC,UAAI,SAAS;AACX,cAAM,IAAI,MAAM,0DAA0D;AAAA,MAC5E;AACA,YAAM,IAAI,MAAM,WAAW;AAC3B,YAAM,cAAkC;AAAA,QACtC,YAAY,MAAM,WAAW;AAAA,QAC7B,YAAY;AAAA;AAAA,QACZ,cAAc;AAAA,QACd,GAAI,MAAM,UAAU,EAAE,YAAY,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE,IAAI,CAAC;AAAA,MAC7E;AAEA,YAAM,KAAK,MAAM,EAAE,KAAK,MAAM,SAAmB,WAAW;AAC5D,UA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ACA,gBAAU,MAAM;AAAA,IAClB;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport type { TaskDriver, TaskDriverProcess } from '@faapi/faapi';\nimport PgBoss from 'pg-boss';\n\n/**\n * pg-boss 驱动选项(透传给 PgBoss 构造函数)\n *\n * 常用:`connectionString`;其余见 pg-boss 文档(ConstructorOptions)。\n */\nexport type PgBossDriverOptions = PgBoss.ConstructorOptions;\n\n/**\n * faapi 任务队列 pg-boss 驱动(PostgreSQL 持久化队列)\n *\n * 与 faapi 主包 `config.task.driver: 'pgboss'` 配合使用:\n *\n * ```ts\n * // faapi.config.ts\n * export default {\n * task: {\n * driver: 'pgboss',\n * pgboss: { connectionString: 'postgres://localhost:5432/app' },\n * },\n * } satisfies FaapiConfig;\n * ```\n *\n * 语义映射(详见包根 README):\n * - `enqueue` → `boss.send(name, payload, { retryLimit, retryDelay, retryBackoff, startAfter })`\n * - `startWorker` → `boss.work(name, { batchSize: concurrency, includeMetadata: true }, handler)`\n * - `stop` → `offWork` + `boss.stop({ close: true, graceful: true, timeout })`;超时后 abort 在跑任务的 signal\n * - 重试 → pg-boss 侧执行(retryLimit + retryBackoff 指数退避)\n */\n/**\n * dedupId → 确定性 UUID:pg-boss 的 send 自定义 id 要求 UUID 格式(SQL 侧 cast),\n * 任意字符串键经 SHA-1 映射为合法 UUID——同键必同 UUID(幂等),不同键碰撞可忽略\n */\nfunction dedupIdToUuid(dedupId: string): string {\n const h = createHash('sha1').update(dedupId).digest('hex');\n return [\n h.slice(0, 8),\n h.slice(8, 12),\n `5${h.slice(13, 16)}`, // version 5\n `${((parseInt(h.slice(16, 17), 16) & 0x3) | 0x8).toString(16)}${h.slice(17, 20)}`, // variant\n h.slice(20, 32),\n ].join('-');\n}\n\nexport function createPgBossDriver(options: PgBossDriverOptions = {}): TaskDriver {\n let boss: PgBoss | null = null;\n let stopped = false;\n /** 已创建的 pg-boss worker id(stopWorkers 时 offWork) */\n const workerIds = new Map<string, string>();\n /** 在跑任务的取消控制器(stop 超时 abort——run 监听 signal 可尽快退出) */\n const inflight = new Map<string, AbortController>();\n\n async function ensureBoss(): Promise<PgBoss> {\n if (!boss) {\n boss = new PgBoss(options);\n // pg-boss 惰性连接:start 后才连库;驱动在首次 enqueue/startWorker 前建立\n await boss.start();\n }\n return boss;\n }\n\n return {\n async enqueue(name, payload, opts) {\n if (stopped) {\n throw new Error('[faapi] Task queue is stopped and no longer accepts jobs');\n }\n const b = await ensureBoss();\n const sendOptions: PgBoss.SendOptions = {\n retryLimit: opts?.retries ?? 0,\n retryDelay: 1, // 秒;配合 retryBackoff 指数退避\n retryBackoff: true,\n ...(opts?.dedupId ? { id: dedupIdToUuid(opts.dedupId) } : {}),\n ...(opts?.delayMs ? { startAfter: new Date(Date.now() + opts.delayMs) } : {}),\n };\n // pg-boss data 形参为 object——基础类型 payload(cron 空任务等)按 JSON 语义透传\n const id = await b.send(name, payload as object, sendOptions);\n if (!id) {\n // dedupId 幂等投递:同键已存在(主键冲突 DO NOTHING → send 返回 null),\n // 返回已存在任务的确定性 id;无 dedupId 的失败投递才是异常\n if (opts?.dedupId) {\n return dedupIdToUuid(opts.dedupId);\n }\n throw new Error(`[faapi] pg-boss send failed for task \"${name}\"`);\n }\n return id;\n },\n\n async startWorker(name, workerOpts) {\n const b = await ensureBoss();\n const process: TaskDriverProcess = workerOpts.process;\n // 二次注册(reload 场景)先 offWork 旧 worker\n const existing = workerIds.get(name);\n if (existing) {\n await b.offWork(existing);\n }\n const workerId = await b.work<unknown>(\n name,\n { batchSize: workerOpts.concurrency, includeMetadata: true },\n async (jobs) => {\n for (const job of jobs) {\n // retryCount 从 0 起(首次执行为 0)→ faapi attempt 从 1 起\n const attempt = job.retryCount + 1;\n // 信号由驱动自管:stop 超时 abort(pg-boss 自身不提供执行中任务的取消能力)\n const controller = new AbortController();\n inflight.set(job.id, controller);\n try {\n await process({\n id: job.id,\n name,\n payload: job.data,\n attempt,\n signal: controller.signal,\n });\n } finally {\n inflight.delete(job.id);\n }\n }\n // handler 正常返回 = 本批全部完成;抛错 = 整批失败由 pg-boss 按 retryLimit 重试\n },\n );\n workerIds.set(name, workerId);\n },\n\n async stop(timeoutMs = 10_000) {\n stopped = true;\n // 等待超时到点 abort 在跑任务(run 监听 signal 尽快退出);等待结束后兜底 abort 残留\n const abortTimer = setTimeout(() => {\n for (const controller of inflight.values()) controller.abort();\n }, timeoutMs);\n try {\n const b = boss;\n if (b) {\n for (const workerId of workerIds.values()) {\n await b.offWork(workerId).catch(() => {});\n }\n workerIds.clear();\n // graceful: 等 in-flight 任务完成;timeout 秒后强制处置\n await b.stop({ close: true, graceful: true, timeout: Math.floor(timeoutMs / 1000) });\n boss = null;\n }\n } finally {\n clearTimeout(abortTimer);\n for (const controller of inflight.values()) controller.abort();\n inflight.clear();\n }\n },\n\n async stopWorkers() {\n const b = boss;\n if (b) {\n for (const workerId of workerIds.values()) {\n await b.offWork(workerId).catch(() => {});\n }\n }\n workerIds.clear();\n },\n\n async cancel(name, id) {\n if (stopped) {\n throw new Error(\n '[faapi] Task queue is stopped and no longer accepts management operations',\n );\n }\n const b = await ensureBoss();\n await b.cancel(name, id);\n },\n\n async retry(name, id) {\n if (stopped) {\n throw new Error(\n '[faapi] Task queue is stopped and no longer accepts management operations',\n );\n }\n const b = await ensureBoss();\n // pg-boss v10 语义:resume 恢复 cancelled 任务;failed 任务无原生重试 API\n await b.resume(name, id);\n },\n // list 未实现:pg-boss v10 无批量列出 jobs 的公开 API(getJobById/getQueueSize 只能单查/计数),\n // 不硬造内部 SQL 依赖——语义层 listQueued 显式抛错,管理走 pg-boss 自身 API/SQL\n };\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAE3B,OAAO,YAAY;AAkCnB,SAAS,cAAc,SAAyB;AAC9C,QAAM,IAAI,WAAW,MAAM,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK;AACzD,SAAO;AAAA,IACL,EAAE,MAAM,G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UAAU;AACvB,mBAAW,cAAc,SAAS,OAAO,EAAG,YAAW,MAAM;AAC7D,iBAAS,MAAM;AAAA,MACjB;AAAA,IACF;AAAA,IAEA,MAAM,cAAc;AAClB,YAAM,IAAI;AACV,UAAI,GAAG;AACL,mBAAW,YAAY,UAAU,OAAO,GAAG;AACzC,gBAAM,EAAE,QAAQ,QAAQ,EAAE,MAAM,MAAM;AAAA,UAAC,CAAC;AAAA,QAC1C;AAAA,MACF;AACA,gBAAU,MAAM;AAAA,IAClB;AAAA,IAEA,MAAM,OAAO,MAAM,IAAI;AACrB,UAAI,SAAS;AACX,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AACA,YAAM,IAAI,MAAM,WAAW;AAC3B,YAAM,EAAE,OAAO,MAAM,EAAE;AAAA,IACzB;AAAA,IAEA,MAAM,MAAM,MAAM,IAAI;AACpB,UAAI,SAAS;AACX,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AACA,YAAM,IAAI,MAAM,WAAW;AAE3B,YAAM,EAAE,OAAO,MAAM,EAAE;AAAA,IACzB;AAAA;AAAA;AAAA,EAGF;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faapi/task-pgboss",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "pg-boss task queue driver for faapi — persistent queue on PostgreSQL",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,11 +24,11 @@
24
24
  "tsup": "^8.4.0",
25
25
  "typescript": "^5.7.0",
26
26
  "vitest": "^4.1.11",
27
- "@faapi/faapi": "6.3.0"
27
+ "@faapi/faapi": "6.4.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "pg-boss": "^10.0.0",
31
- "@faapi/faapi": "^6.3.0"
31
+ "@faapi/faapi": "^6.4.0"
32
32
  },
33
33
  "license": "MIT",
34
34
  "repository": {