fix: cleanup old scheduled_task_executions
This commit is contained in:
@@ -57,6 +57,14 @@ class CleanupDatabase extends Command
|
|||||||
$application_deployment_queues->delete();
|
$application_deployment_queues->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup scheduled_task_executions table
|
||||||
|
$scheduled_task_executions = DB::table('scheduled_task_executions')->where('created_at', '<', now()->subDays($keep_days))->orderBy('created_at', 'desc');
|
||||||
|
$count = $scheduled_task_executions->count();
|
||||||
|
echo "Delete $count entries from scheduled_task_executions.\n";
|
||||||
|
if ($this->option('yes')) {
|
||||||
|
$scheduled_task_executions->delete();
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup webhooks table
|
// Cleanup webhooks table
|
||||||
$webhooks = DB::table('webhooks')->where('created_at', '<', now()->subDays($keep_days));
|
$webhooks = DB::table('webhooks')->where('created_at', '<', now()->subDays($keep_days));
|
||||||
$count = $webhooks->count();
|
$count = $webhooks->count();
|
||||||
|
|||||||
Reference in New Issue
Block a user