From 484a3dbe5c090b41f0bc1b6c74f101f853846b26 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 11 Apr 2024 12:56:24 +0200 Subject: [PATCH] Add scheduled task to clear uploads every two minutes --- app/Console/Kernel.php | 2 ++ config/chunk-upload.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 835c0afe2..92cbf9c5c 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -33,6 +33,7 @@ class Kernel extends ConsoleKernel $this->check_scheduled_backups($schedule); $this->pull_helper_image($schedule); $this->check_scheduled_tasks($schedule); + $schedule->command('uploads:clear')->everyTwoMinutes(); } else { // Instance Jobs $schedule->command('horizon:snapshot')->everyFiveMinutes(); @@ -49,6 +50,7 @@ class Kernel extends ConsoleKernel $this->check_scheduled_tasks($schedule); $schedule->command('cleanup:database --yes')->daily(); + $schedule->command('uploads:clear')->everyTwoMinutes(); } } private function pull_helper_image($schedule) diff --git a/config/chunk-upload.php b/config/chunk-upload.php index 0294f1b86..a0baf8139 100644 --- a/config/chunk-upload.php +++ b/config/chunk-upload.php @@ -20,7 +20,7 @@ return [ */ 'timestamp' => '-1 HOURS', 'schedule' => [ - 'enabled' => true, + 'enabled' => false, 'cron' => '25 * * * *', // run every hour on the 25th minute ], ],