gongxiangp2/scripts/manual-trigger-transcode.ts
chenpei 7326e273e1 fix: harden media upload and release safety
Protect upload cleanup and atomic completion paths, add durable media worker leases and brand asset validation, and introduce verified migration/bootstrap/deployment gates.
2026-08-12 18:04:08 +08:00

15 lines
716 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 已停用:旧脚本会绕过数据库租约直接重置 processing 状态,且 CLI 进程
* 在“入队”后立即退出,既可能制造重复 FFmpeg,也不能保证任务真正完成。
*
* 当前安全路径:
* 1. pending/过期 processing 由应用启动及每 60 秒恢复扫描自动接回;
* 2. 明确失败的单条素材由有权限的用户通过 /api/materials/transcode 重试;
* 3. 缺源或生产事故先按事故复盘的源文件保全流程核验,不得批量改状态。
*/
console.error(
'manual-trigger-transcode.ts 已停用:请使用后台自动恢复或受权限保护的单素材重试接口,禁止直接重置数据库状态。',
)
process.exitCode = 1