feat: enhance file upload process with temporary file handling, improved error management, and metrics logging

This commit is contained in:
MythEclipse
2026-05-22 00:29:54 +07:00
parent fd5eb98586
commit 56b929ffb1
7 changed files with 176 additions and 75 deletions
+9 -6
View File
@@ -71,11 +71,14 @@ export const fileInfoCache = new Cache<{
}>(3600);
// Cleanup expired cache entries every 5 minutes
setInterval(() => {
const removed = fileInfoCache.cleanup();
if (removed > 0) {
console.log(`Cleaned up ${removed} expired cache entries`);
}
}, 5 * 60 * 1000);
setInterval(
() => {
const removed = fileInfoCache.cleanup();
if (removed > 0) {
console.log(`Cleaned up ${removed} expired cache entries`);
}
},
5 * 60 * 1000,
);
export { Cache };