Skip to content

Commit

Permalink
Add scheduled task to clear uploads every two minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Apr 11, 2024
1 parent 9c7f40e commit 484a3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected function schedule(Schedule $schedule): void
$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();
Expand All @@ -49,6 +50,7 @@ protected function schedule(Schedule $schedule): void
$this->check_scheduled_tasks($schedule);

$schedule->command('cleanup:database --yes')->daily();
$schedule->command('uploads:clear')->everyTwoMinutes();
}
}
private function pull_helper_image($schedule)
Expand Down
2 changes: 1 addition & 1 deletion config/chunk-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
'timestamp' => '-1 HOURS',
'schedule' => [
'enabled' => true,
'enabled' => false,
'cron' => '25 * * * *', // run every hour on the 25th minute
],
],
Expand Down

0 comments on commit 484a3db

Please sign in to comment.