Browse Source

update cacheServerStat

Tokumeikoi 4 years ago
parent
commit
3200c427ce
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/Console/Commands/V2boardCache.php

+ 2 - 0
app/Console/Commands/V2boardCache.php

@@ -5,6 +5,7 @@ namespace App\Console\Commands;
 use App\Utils\CacheKey;
 use Illuminate\Console\Command;
 use App\Models\ServerLog;
+use App\Models\ServerStat;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\DB;
 
@@ -63,6 +64,7 @@ class V2boardCache extends Command
                 'online' => $serverLog->online
             ];
             Cache::put(CacheKey::get('SERVER_STAT', $serverLog->server_id), json_encode($data), 3600);
+            ServerStat::create($data);
         }
     }
 }