mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
feat: 优化点击等待,补充缺少任务ID的日志等
This commit is contained in:
+6
-2
@@ -77,9 +77,13 @@ export function createQueueManager(queueConfig, callbacks) {
|
||||
*/
|
||||
async function cleanupTask(task) {
|
||||
if (task?.imagePaths) {
|
||||
const fs = await import('fs');
|
||||
const fs = await import('fs/promises');
|
||||
for (const p of task.imagePaths) {
|
||||
try { fs.unlinkSync(p); } catch (e) { /* ignore */ }
|
||||
try {
|
||||
await fs.unlink(p);
|
||||
} catch (e) {
|
||||
logger.debug('服务器', `临时文件清理失败: ${p}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user