refactor: Update CleanupDatabase.php to adjust keep_days based on environment
This commit is contained in:
parent
e8b2d8bf03
commit
35dbced3c5
1 changed files with 5 additions and 1 deletions
|
|
@ -18,7 +18,11 @@ public function handle()
|
||||||
} else {
|
} else {
|
||||||
echo "Running database cleanup in dry-run mode...\n";
|
echo "Running database cleanup in dry-run mode...\n";
|
||||||
}
|
}
|
||||||
$keep_days = 60;
|
if (isCloud()) {
|
||||||
|
$keep_days = 30;
|
||||||
|
} else {
|
||||||
|
$keep_days = 60;
|
||||||
|
}
|
||||||
echo "Keep days: $keep_days\n";
|
echo "Keep days: $keep_days\n";
|
||||||
// Cleanup failed jobs table
|
// Cleanup failed jobs table
|
||||||
$failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(1));
|
$failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(1));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue