Spaces:
Configuration error
Configuration error
Download src/queue/recovery.js from UUUZCX/video-optimizer-bot: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/queue/recovery.js
- Command line
-
hf download hf://spaces/UUUZCX/video-optimizer-bot/src/queue/recovery.js
-
curl -L -o recovery.js https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/queue/recovery.js
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 }; | |