From afe6948da87ed4267c2cb0586d1407d81af49b0e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 26 Jun 2023 04:33:47 -0600 Subject: [PATCH] Update console kernel, add import upload gc --- .../Commands/ImportUploadCleanStorage.php | 42 +++++++++++++++++++ app/Console/Kernel.php | 1 + 2 files changed, 43 insertions(+) create mode 100644 app/Console/Commands/ImportUploadCleanStorage.php diff --git a/app/Console/Commands/ImportUploadCleanStorage.php b/app/Console/Commands/ImportUploadCleanStorage.php new file mode 100644 index 000000000..31b0fac74 --- /dev/null +++ b/app/Console/Commands/ImportUploadCleanStorage.php @@ -0,0 +1,42 @@ +find($uid); + if(!$skip) { + Storage::deleteDirectory($dir); + } + } + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 7b1f632ed..046924eb6 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -41,6 +41,7 @@ class Kernel extends ConsoleKernel $schedule->command('app:transform-imports')->everyFourMinutes(); $schedule->command('app:import-upload-garbage-collection')->hourlyAt(51); $schedule->command('app:import-remove-deleted-accounts')->hourlyAt(37); + $schedule->command('app:import-upload-clean-storage')->twiceDailyAt(1, 13, 32); } }