This commit is contained in:
jonathang4 2025-05-31 21:17:01 +08:00
parent 9639d5bfb6
commit 0708b908b3
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ function cacheLog(value: string, color?: string) {
try { try {
const head = `[VideoTaskCache][${dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")}] `; const head = `[VideoTaskCache][${dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")}] `;
value = head + value; value = head + value;
console.log(color ? value[color] : value); // console.log(color ? value[color] : value);
fs.ensureDirSync(path.dirname(LOG_PATH)); fs.ensureDirSync(path.dirname(LOG_PATH));
fs.appendFileSync(LOG_PATH, value + "\n"); fs.appendFileSync(LOG_PATH, value + "\n");
} }

View File

@ -17,7 +17,7 @@ export default {
task_id, task_id,
} = request.query; // 从 query 中获取 } = request.query; // 从 query 中获取
let res = videoTaskCache.getTaskStatus(task_id); let res = videoTaskCache.getTaskStatus(task_id);
console.log("查询任务状态", task_id, 'res:',res); // console.log("查询任务状态", task_id, 'res:',res);
if(typeof res === 'string'){ if(typeof res === 'string'){
return { return {
created: util.unixTimestamp(), created: util.unixTimestamp(),