From e71e525ac9be17ca5584a3e8bbe2a709220353fd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 17 Jan 2021 01:47:02 -0700 Subject: [PATCH] Update console kernel --- .../Commands/FixSoftDeletedProfile.php | 60 ------------------- app/Console/Kernel.php | 7 +-- 2 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 app/Console/Commands/FixSoftDeletedProfile.php diff --git a/app/Console/Commands/FixSoftDeletedProfile.php b/app/Console/Commands/FixSoftDeletedProfile.php deleted file mode 100644 index 3fe90ff3..00000000 --- a/app/Console/Commands/FixSoftDeletedProfile.php +++ /dev/null @@ -1,60 +0,0 @@ -withTrashed() - ->where('deleted_at', '>', now()->subDays(14)) - ->whereNull('status') - ->pluck('username'); - - if($profiles->count() == 0) { - return 0; - } - - foreach($profiles as $p) { - if(User::whereUsername($p)->first()->status == null) { - $pro = Profile::withTrashed()->whereUsername($p)->firstOrFail(); - $pro->deleted_at = null; - $pro->save(); - } - } - } -} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d5e1d47a..0dd65888 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -25,13 +25,10 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - $schedule->command('media:optimize') - ->hourly(); - $schedule->command('media:gc') - ->hourly(); + $schedule->command('media:optimize')->hourly(); + $schedule->command('media:gc')->hourly(); $schedule->command('horizon:snapshot')->everyFiveMinutes(); $schedule->command('story:gc')->everyFiveMinutes(); - $schedule->command('fix:sdprofile')->everyFiveMinutes(); $schedule->command('gc:failedjobs')->dailyAt(3); $schedule->command('gc:passwordreset')->dailyAt('09:41'); }