diff --git a/app/Actions/DbMaintainAction.php b/app/Actions/DbMaintainAction.php new file mode 100644 index 00000000..45e3f8fc --- /dev/null +++ b/app/Actions/DbMaintainAction.php @@ -0,0 +1,23 @@ + 168]); // 168h = 7 Tage + DB::select('optimize table telescope_entries'); + Http::post('https://zoomyboy.de/maintain'); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a85a22d8..2fe7629d 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,11 +2,11 @@ namespace App\Console; +use App\Actions\DbMaintainAction; use App\Initialize\InitializeMembers; use App\Invoice\Actions\InvoiceSendAction; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; -use Laravel\Telescope\Console\PruneCommand; class Kernel extends ConsoleKernel { @@ -18,6 +18,7 @@ class Kernel extends ConsoleKernel protected $commands = [ InvoiceSendAction::class, InitializeMembers::class, + DbMaintainAction::class, ]; /** @@ -27,7 +28,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - $schedule->command(PruneCommand::class, ['--hours' => 168])->daily(); // 168h = 7 Tage + $schedule->command(DbMaintainAction::class)->daily(); $schedule->command(InitializeMembers::class)->dailyAt('03:00'); }