fix: update DeleteCron to remove deleted lists
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
@@ -164,4 +164,15 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
|
||||
|
||||
return $result !== false ? $result : null;
|
||||
}
|
||||
|
||||
public function findToDelete(): array {
|
||||
// add buffer of 5 min
|
||||
$timeLimit = time() - (60 * 5);
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('*')
|
||||
->from($this->getTableName())
|
||||
->where($qb->expr()->neq('deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->lt('deleted_at', $qb->createNamedParameter($timeLimit, IQueryBuilder::PARAM_INT)));
|
||||
return $this->findEntities($qb);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user