fix(scheduled-task): enable worker by default and add WeChat preflight
Memind CI / Test, build, and release guards (push) Has been cancelled
Memind CI / Test, build, and release guards (push) Has been cancelled
Scheduled automations were saved but never executed because the worker required an explicit env flag. Follow H5_REMINDER_WORKER_ENABLED when unset, add WeChat preflight to write tasks deterministically, and surface worker warnings on create. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* 默认:DB + mock worker 全链路(无需 Portal 进程)
|
||||
* 可选:
|
||||
* VERIFY_SCHEDULED_TASK_LIVE=1 等待已开启 worker 的 Portal 到点执行(需 H5_SCHEDULED_TASK_WORKER_ENABLED=1)
|
||||
* VERIFY_SCHEDULED_TASK_LIVE=1 等待已开启 worker 的 Portal 到点执行(需 H5_SCHEDULED_TASK_WORKER_ENABLED=1 或未显式关闭且 H5_REMINDER_WORKER_ENABLED=1)
|
||||
* --due-seconds=90 创建 N 秒后执行的一次性任务(live 模式用)
|
||||
*/
|
||||
import assert from 'node:assert/strict';
|
||||
@@ -204,7 +204,7 @@ async function testLivePortalWorker(pool, userId, { dueSeconds }) {
|
||||
pass('Live 任务已创建', `${waitSeconds}s 后执行,id=${created.id}`);
|
||||
|
||||
console.log(`\n等待 Portal worker 执行(最多 ${waitSeconds + 120}s)…`);
|
||||
console.log('请确认 Portal 进程已设置 H5_SCHEDULED_TASK_WORKER_ENABLED=1\n');
|
||||
console.log('请确认 Portal 进程已开启 scheduled task worker(H5_SCHEDULED_TASK_WORKER_ENABLED=1,或未设置时 H5_REMINDER_WORKER_ENABLED=1)\n');
|
||||
|
||||
const deadline = Date.now() + (waitSeconds + 120) * 1000;
|
||||
let terminal = null;
|
||||
|
||||
Reference in New Issue
Block a user