Bug: catch excrption request to engine fail

CR: sonhh (fake)
This commit is contained in:
2021-08-26 16:51:36 +07:00
parent b207d54462
commit 14467d53b5
10 changed files with 124 additions and 79 deletions

View File

@@ -100,11 +100,14 @@ class ControlLogsController extends Controller {
if (!$this->resizeImg($img, $fileTarget))
$fileName = $url;
$features = json_decode(common::requestToEngine("/get-feature", [
$features = common::requestToEngine("/get-feature", [
"image_paths" => [
["url" => "/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName, "type" => "raw"]
]
]), true);
]);
if (!$features['status'])
return ["status" => false, "text" => Yii::t("app", "ENGINE_KHONG_HOAT_DONG")];
$features = json_decode($features['data'], true);
$images[] = [
"url" => $fileName,
"urlOld" => $url,