mirror of
https://github.com/v2board/v2board.git
synced 2025-06-13 13:17:52 +08:00
update
This commit is contained in:
@ -45,7 +45,6 @@ class SystemCache extends Command
|
||||
{
|
||||
$this->setMonthIncome();
|
||||
$this->setMonthRegisterTotal();
|
||||
$this->setMonthServerTrafficTotal();
|
||||
}
|
||||
|
||||
private function setMonthIncome() {
|
||||
@ -66,15 +65,4 @@ class SystemCache extends Command
|
||||
->count()
|
||||
);
|
||||
}
|
||||
|
||||
private function setMonthServerTrafficTotal () {
|
||||
$servers = Server::get();
|
||||
foreach ($servers as $item) {
|
||||
$serverLog = ServerLog::where('created_at', '>=', strtotime(date('Y-m-1')))
|
||||
->where('created_at', '<', time())
|
||||
->where('node_id', $item->id);
|
||||
Redis::set('month_server_traffic_total_u_' . $item->id, $serverLog->sum('u'));
|
||||
Redis::set('month_server_traffic_total_d_' . $item->id, $serverLog->sum('d'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user