mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 15:23:17 -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
db5fbe46ab
commit
c3895990c5
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ use OC\BackgroundJob\QueuedJob;
|
|||
use OCA\DAV\CardDAV\CardDavBackend;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
|
||||
|
|
@ -98,6 +99,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->execute()->fetchAll();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue