update: reset server log period

This commit is contained in:
tokumeikoi 2022-12-15 11:01:31 +08:00
parent b9f3838e3b
commit ac47a879fa

View File

@ -3,6 +3,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Models\Plan; use App\Models\Plan;
use App\Models\StatServer;
use App\Models\StatUser; use App\Models\StatUser;
use App\Utils\Helper; use App\Utils\Helper;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@ -43,7 +44,7 @@ class ResetLog extends Command
*/ */
public function handle() public function handle()
{ {
StatUser::where('record_at', '<', strtotime('-2 month', time())) StatUser::where('record_at', '<', strtotime('-2 month', time()))->delete();
->delete(); StatServer::where('record_at', '<', strtotime('-2 month', time()))->delete();
} }
} }