judge: cache.prune: delete etags first

This commit is contained in:
undefined committed 2023-12-19 21:01:07 +08:00
1 parent 3f3ecbd6d9
commit fdb732a077
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ Feel free to create an account and then navigate to `MyAccount > MyDomains > Cre
Email: i@undefined.moe
Hydro QQ User Group: 1085853538
Telegram Group [@hydrodev](https://t.me/hydrodev)
Telegram [@webpack_exports_undefined](https://t.me/webpack_exports_undefined)
Telegram [@undefinedmoe](https://t.me/undefinedmoe)
## License
+2
View File
@@ -37,6 +37,8 @@ export = function main() {
lastUsage = +content || 0;
}
if (lastUsage + duration * 24 * 3600 * 1000 > now) continue;
const etags = path.resolve(problemdir, 'etags');
if (fs.existsSync(etags)) fs.unlinkSync(etags);
fs.removeSync(problemdir);
cnt++;
logger.info('Removed cache %s', problemdir);