mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: cache.prune: delete etags first
This commit is contained in:
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user