fix bug in caching time being ignored

This commit is contained in:
rubikscraft
2022-09-16 13:16:27 +02:00
parent 4e2f00545e
commit e0887fa5b8

View File

@@ -129,7 +129,7 @@ export class ImageFileDBService {
): AsyncFailable<number> {
try {
const result = await this.imageDerivativeRepo.delete({
last_read: LessThan(new Date()),
last_read: LessThan(new Date(Date.now() - olderThanSeconds * 1000)),
});
return result.affected ?? 0;