diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-07-01 13:37:06 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-07-01 14:31:27 +0200 |
commit | 1d3ff4337e51bdf967ea3e19dc6105e496be727b (patch) | |
tree | 5d81f24aba233dea311b28f7962a59cc53494bd7 /apps/dav | |
parent | beececf66068f57c416225efcde9b44ce5c2e835 (diff) | |
download | nextcloud-server-1d3ff4337e51bdf967ea3e19dc6105e496be727b.tar.gz nextcloud-server-1d3ff4337e51bdf967ea3e19dc6105e496be727b.zip |
fix(BuildSocialSearchIndexBackgroundJob): offset not applied
with more than 100 results, this job may never finish
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php index 59e7b05e3d1..138f764f1e6 100644 --- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php +++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php @@ -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(); |