1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 15:33:44 +01:00

Fixed YABS JSON parsing disk as ram

Fixed YABS JSON parsing disk as ram
Added cache forget for YASB and server
This commit is contained in:
cp6 2022-09-22 11:12:29 +10:00
parent 91a1466f09
commit 9dc73ba4fe

View File

@ -205,10 +205,10 @@ class Yabs extends Model
}
if ($disk > 10000) {
$disk_f = ($ram / 1024 / 1024);
$disk_f = ($disk / 1024 / 1024);
$disk_type = 'TB';
} else {
$disk_f = ($ram / 1024);
$disk_f = ($disk / 1024);
$disk_type = 'GB';
}
@ -314,6 +314,11 @@ class Yabs extends Model
'has_yabs' => 1
]);
Cache::forget("yabs.$yabs_id");
Cache::forget("all_yabs");
Cache::forget("server.$server_id");
Cache::forget("all_servers");
} catch (Exception $e) {//Not valid JSON
return false;
}