Add scheduled task to clear uploads every two minutes

This commit is contained in:
Andras Bacsai 2024-04-11 12:56:24 +02:00
parent 9c7f40e4fe
commit 484a3dbe5c
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@ protected function schedule(Schedule $schedule): void
$this->check_scheduled_backups($schedule); $this->check_scheduled_backups($schedule);
$this->pull_helper_image($schedule); $this->pull_helper_image($schedule);
$this->check_scheduled_tasks($schedule); $this->check_scheduled_tasks($schedule);
$schedule->command('uploads:clear')->everyTwoMinutes();
} else { } else {
// Instance Jobs // Instance Jobs
$schedule->command('horizon:snapshot')->everyFiveMinutes(); $schedule->command('horizon:snapshot')->everyFiveMinutes();
@ -49,6 +50,7 @@ protected function schedule(Schedule $schedule): void
$this->check_scheduled_tasks($schedule); $this->check_scheduled_tasks($schedule);
$schedule->command('cleanup:database --yes')->daily(); $schedule->command('cleanup:database --yes')->daily();
$schedule->command('uploads:clear')->everyTwoMinutes();
} }
} }
private function pull_helper_image($schedule) private function pull_helper_image($schedule)

View File

@ -20,7 +20,7 @@
*/ */
'timestamp' => '-1 HOURS', 'timestamp' => '-1 HOURS',
'schedule' => [ 'schedule' => [
'enabled' => true, 'enabled' => false,
'cron' => '25 * * * *', // run every hour on the 25th minute 'cron' => '25 * * * *', // run every hour on the 25th minute
], ],
], ],