1
This commit is contained in:
parent
9639d5bfb6
commit
0708b908b3
@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user