mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(BuildSocialSearchIndexBackgroundJob): offset not applied
with more than 100 results, this job may never finish Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
beececf660
commit
1d3ff4337e
1 changed files with 2 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ use OCA\DAV\CardDAV\CardDavBackend;
|
|||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\BackgroundJob\QueuedJob;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
|
@ -59,6 +60,7 @@ class BuildSocialSearchIndexBackgroundJob extends QueuedJob {
|
|||
->from('cards', 'c')
|
||||
->orderBy('id', 'ASC')
|
||||
->where($query->expr()->like('carddata', $query->createNamedParameter('%SOCIALPROFILE%')))
|
||||
->andWhere($query->expr()->gt('id', $query->createNamedParameter((int)$offset, IQueryBuilder::PARAM_INT)))
|
||||
->setMaxResults(100);
|
||||
$social_cards = $query->executeQuery()->fetchAll();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue