update request log
This commit is contained in:
@@ -29,6 +29,12 @@ class CleanRequestLogsCommand extends HyperfCommand
|
||||
public function handle(): void
|
||||
{
|
||||
$days = (int) $this->input->getOption('days');
|
||||
|
||||
if ($days < 1) {
|
||||
$this->error('保留天数必须大于 0');
|
||||
return;
|
||||
}
|
||||
|
||||
$cutoff = Carbon::now()->subDays($days);
|
||||
|
||||
$deleted = ApiRequestLog::query()
|
||||
|
||||
Reference in New Issue
Block a user