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:
parent
325e74e586
commit
bac23250be
@ -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'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user