implement torrent scrape queue

This commit is contained in:
ghost 2023-10-09 05:09:18 +03:00
parent d2f7fff24e
commit 1b722812e8
7 changed files with 194 additions and 24 deletions

View file

@ -30,4 +30,14 @@ class TorrentRepository extends ServiceEntityRepository
->getOneOrNullResult()
;
}
public function getTorrentScrapeQueue(): ?Torrent
{
return $this->createQueryBuilder('t')
->orderBy('t.scraped', 'ASC') // same to ts.added
->setMaxResults(1)
->getQuery()
->getOneOrNullResult()
;
}
}