Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(caldav): lower scheduling table size warning #45974

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 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 {
public const MAX_SCHEDULING_ENTRIES = 50000;

public function __construct(
private IL10N $l10n,
private IDBConnection $connection,
Expand All @@ -36,9 +38,11 @@ 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 %s rows in the scheduling objects table. Please run the expensive repair jobs via occ maintenance:repair --include-expensive.', [
nickvergessen marked this conversation as resolved.
Show resolved Hide resolved
self::MAX_SCHEDULING_ENTRIES,
])
);
}
return SetupResult::success(
Expand Down
Loading