fix(prod): dedupe scheduled tasks and reconcile orphan delivery contracts
Memind CI / Test, build, and release guards (push) Successful in 2m58s
Memind CI / Test, build, and release guards (push) Successful in 2m58s
Prevent duplicate active scheduled tasks, fail static preparing contracts when HTML is missing, raise MindSpace remote timeout default to 30s, and add 103 repair scripts for inspection follow-ups. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { buildChatSkillPrompt, SCHEDULED_TASK_AUTOMATION_SKILL_NAME } from './chat-skills.mjs';
|
||||
import {
|
||||
markPageDeliveryContractFailed,
|
||||
markPageDeliveryContractReady,
|
||||
normalizeDeliveryRelativePath,
|
||||
preparePageDeliveryContract,
|
||||
@@ -366,7 +367,22 @@ export async function reconcileStuckStaticPageDeliveryContracts({
|
||||
row.user_id,
|
||||
relativePath,
|
||||
);
|
||||
if (!fs.existsSync(filePath)) continue;
|
||||
if (!fs.existsSync(filePath)) {
|
||||
if (
|
||||
await markPageDeliveryContractFailed({
|
||||
pool,
|
||||
userId: row.user_id,
|
||||
relativePath,
|
||||
failureReason: 'materialized_html_missing',
|
||||
})
|
||||
) {
|
||||
logger.info?.('[ScheduledTask] failed orphan static delivery contract', {
|
||||
userId: row.user_id,
|
||||
relativePath,
|
||||
});
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
await markPageDeliveryContractReady({
|
||||
pool,
|
||||
|
||||
Reference in New Issue
Block a user