cloud: run cleanup every day

This commit is contained in:
Andras Bacsai committed 2024-03-26 11:17:48 +01:00
1 parent dcaa2f4168
commit a8417aca16
5 files changed
+5 -7

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ class CleanupDatabase extends Command
$keep_days = 60;
echo "Keep days: $keep_days\n";
// Cleanup failed jobs table
$failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(7));
$failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(1));
$count = $failed_jobs->count();
echo "Delete $count entries from failed_jobs.\n";
if ($this->option('yes')) {
+1 -3
View File
@@ -48,9 +48,7 @@ class Kernel extends ConsoleKernel
$this->pull_helper_image($schedule);
$this->check_scheduled_tasks($schedule);
if (!isCloud()) {
$schedule->command('cleanup:database --yes')->daily();
}
$schedule->command('cleanup:database --yes')->daily();
}
}
private function pull_helper_image($schedule)