fix bug in caching time being ignored

This commit is contained in:
rubikscraft 2022-09-16 13:16:27 +02:00 committed by Rubikscraft
parent 9cdf909994
commit 58ff75c728

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;