update file_get_content timeout

This commit is contained in:
dongpd 2023-06-09 11:59:55 +07:00
parent 58a5522642
commit ea202ccc3f
2 changed files with 3 additions and 1 deletions

View File

@ -6,5 +6,6 @@ return [
"maxLogs" => 50000,
"maxPicture" => 9999,
"version" => "1.0.7",
"autoSyncLog" => false
"autoSyncLog" => false,
"timeoutRequestServer" => 10
];

View File

@ -109,6 +109,7 @@ class ApiController extends Controller {
$text = implode("|", $data);
$res = json_decode(@file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
'http' => [
'timeout' => Yii::$app->params['timeoutRequestServer'],
'header' => "Content-Type: application/json",
'method' => "POST",
'content' => json_encode([