]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(caldav): lower scheduling table size warning 46580/head
authorAnna Larch <anna@nextcloud.com>
Wed, 19 Jun 2024 13:04:53 +0000 (15:04 +0200)
committerAndy Scherzinger <info@andy-scherzinger.de>
Thu, 25 Jul 2024 18:16:38 +0000 (20:16 +0200)
Signed-off-by: Anna Larch <anna@nextcloud.com>
apps/settings/lib/SetupChecks/SchedulingTableSize.php

index cf629f5b12c9cc03d81aff9ca19d2441ab551003..b23972ca7dc64bb39af8bd94a0bf920426f1f49f 100644 (file)
@@ -14,6 +14,8 @@ use OCP\SetupCheck\ISetupCheck;
 use OCP\SetupCheck\SetupResult;
 
 class SchedulingTableSize implements ISetupCheck {
+       public const MAX_SCHEDULING_ENTRIES = 50000;
+
        public function __construct(
                private IL10N $l10n,
                private IDBConnection $connection,
@@ -36,9 +38,11 @@ class SchedulingTableSize implements ISetupCheck {
                $count = $query->fetchOne();
                $query->closeCursor();
 
-               if ($count > 500000) {
+               if ($count > self::MAX_SCHEDULING_ENTRIES) {
                        return SetupResult::warning(
-                               $this->l10n->t('You have more than 500 000 rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive')
+                               $this->l10n->t('You have more than %s rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive.', [
+                                       self::MAX_SCHEDULING_ENTRIES,
+                               ])
                        );
                }
                return SetupResult::success(