mirror of
https://github.com/v2board/v2board.git
synced 2025-01-10 16:19:10 +08:00
update: reset server log period
This commit is contained in:
parent
b9f3838e3b
commit
ac47a879fa
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user