cloud: run cleanup every day

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

View File

@ -20,7 +20,7 @@ public function handle()
$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')) {

View File

@ -48,9 +48,7 @@ protected function schedule(Schedule $schedule): void
$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)

View File

@ -7,7 +7,7 @@
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.244',
'release' => '4.0.0-beta.245',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.244';
return '4.0.0-beta.245';

View File

@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
"version": "4.0.0-beta.244"
"version": "4.0.0-beta.245"
}
}
}