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:
parent
91a1466f09
commit
9dc73ba4fe
@ -205,10 +205,10 @@ class Yabs extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($disk > 10000) {
|
if ($disk > 10000) {
|
||||||
$disk_f = ($ram / 1024 / 1024);
|
$disk_f = ($disk / 1024 / 1024);
|
||||||
$disk_type = 'TB';
|
$disk_type = 'TB';
|
||||||
} else {
|
} else {
|
||||||
$disk_f = ($ram / 1024);
|
$disk_f = ($disk / 1024);
|
||||||
$disk_type = 'GB';
|
$disk_type = 'GB';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +314,11 @@ class Yabs extends Model
|
|||||||
'has_yabs' => 1
|
'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
|
} catch (Exception $e) {//Not valid JSON
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user