feat(server): 完成 F19~F19d pg-boss 作业系统迁移\n\n- 引入 pg-boss(JOB_DRIVER=pgboss)并保留 cron 回滚\n- OCR/委派回收/超期归档改由 pg-boss schedule + work 执行\n- OCR_PROVIDER=off 自动 unschedule ocr.tick\n- 更新 trialrun env/compose/runbook 与 README,并推进 CSV 状态为 DONE
这个提交包含在:
@@ -0,0 +1,26 @@
|
||||
const { startDelegationRevokeJob } = require("./delegationRevokeJob");
|
||||
const { startInvoiceArchiveJob } = require("./invoiceArchiveJob");
|
||||
const { startOcrJob } = require("./ocrJob");
|
||||
const { startPgBossJobs } = require("./pgBossJobs");
|
||||
|
||||
async function startJobs(fastify) {
|
||||
if (!fastify.config.jobsEnabled) {
|
||||
fastify.log.info("Jobs disabled");
|
||||
return { driver: "disabled" };
|
||||
}
|
||||
|
||||
if (fastify.config.jobDriver === "pgboss") {
|
||||
await startPgBossJobs(fastify);
|
||||
return { driver: "pgboss" };
|
||||
}
|
||||
|
||||
startDelegationRevokeJob(fastify);
|
||||
startOcrJob(fastify);
|
||||
startInvoiceArchiveJob(fastify);
|
||||
return { driver: "cron" };
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
startJobs,
|
||||
};
|
||||
|
||||
在新工单中引用
屏蔽一个用户