Skip to content

Commit

Permalink
fix(caldav): lower scheduling table size warning
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Larch <anna@nextcloud.com>
  • Loading branch information
miaulalala committed Jun 25, 2024
1 parent eed6216 commit dcf8fcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/settings/lib/SetupChecks/SchedulingTableSize.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use OCP\SetupCheck\SetupResult;

class SchedulingTableSize implements ISetupCheck {
const int MAX_SCHEDULING_ENTRIES = 50000;

public function __construct(
private IL10N $l10n,
private IDBConnection $connection,
Expand All @@ -36,9 +38,9 @@ public function run(): SetupResult {
$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 ' . self::MAX_SCHEDULING_ENTRIES . ' rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive')
);
}
return SetupResult::success(
Expand Down

0 comments on commit dcf8fcf

Please sign in to comment.