mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
update cacheServerStat
This commit is contained in:
parent
a40a1ab674
commit
3200c427ce
@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
|||||||
use App\Utils\CacheKey;
|
use App\Utils\CacheKey;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use App\Models\ServerLog;
|
use App\Models\ServerLog;
|
||||||
|
use App\Models\ServerStat;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ class V2boardCache extends Command
|
|||||||
'online' => $serverLog->online
|
'online' => $serverLog->online
|
||||||
];
|
];
|
||||||
Cache::put(CacheKey::get('SERVER_STAT', $serverLog->server_id), json_encode($data), 3600);
|
Cache::put(CacheKey::get('SERVER_STAT', $serverLog->server_id), json_encode($data), 3600);
|
||||||
|
ServerStat::create($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user