video-optimizer-bot / src /queue /recovery.js
Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
408 Bytes
const { getDb } = require("../config/db");
const { nowIso } = require("../utils/time");
function recoverInterruptedJobs() {
getDb().prepare(`
UPDATE jobs
SET status = 'retrying', stage = 'recovered', updated_at = ?
WHERE status IN ('downloading', 'validating', 'probing', 'planning', 'splitting', 'compressing', 'uploading')
`).run(nowIso());
}
module.exports = { recoverInterruptedJobs };