1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-04-21 07:22:20 +02:00

Correct handling of disabled backup notifications

This commit is contained in:
Kovah 2025-02-06 10:53:12 +01:00
parent 325e74e586
commit bac23250be

View File

@ -18,13 +18,17 @@ class Kernel extends ConsoleKernel
$schedule->command('links:check')->everyTwoHours()->withoutOverlapping();
if (config('backup.backup.enabled')) {
$notificationsDisabled = config('backup.notifications.enabled') === false;
$backupArgs = [];
$schedule->command('backup:clean', ['--disable-notifications' => $notificationsDisabled])
if (config('backup.notifications.enabled') === false) {
$backupArgs[] = '--disable-notifications';
}
$schedule->command('backup:clean', $backupArgs)
->daily()
->at(config('backup.backup.clean_hour'));
$schedule->command('backup:run', ['--disable-notifications' => $notificationsDisabled])
$schedule->command('backup:run', $backupArgs)
->daily()
->at(config('backup.backup.backup_hour'));
}