Update lib/private/TextToImage/Db/TaskMapper.php

Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-10-23 11:44:48 +02:00 committed by GitHub
parent f9d209cf15
commit ded77292d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,7 @@ class TaskMapper extends QBMapper {
* @throws Exception
*/
public function deleteOlderThan(int $timeout): array {
$datetime = new DateTime();
$datetime = $this->timeFactory->getDateTime();
$datetime->sub(new \DateInterval('PT'.$timeout.'S'));
$qb = $this->db->getQueryBuilder();
$qb->select('*')