diff --git a/app/Console/Commands/ImportUploadCleanStorage.php b/app/Console/Commands/ImportUploadCleanStorage.php new file mode 100644 index 00000000..31b0fac7 --- /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 7b1f632e..046924eb 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); } }