فهرست منبع

将erp的每个店铺的请求时长设置为10分钟 如果10分钟后没返回 就视为错误

lvhao 13 ساعت پیش
والد
کامیت
146bddfa4e
1فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 3 4
      core/CoreApp/models/Model_api.php

+ 3 - 4
core/CoreApp/models/Model_api.php

@@ -131,11 +131,10 @@ function __construct(){
 				curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
 				curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($post));
 				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-				curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1800000);
+				curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,600); //只等待10分钟 
 				$res = curl_exec($ch);
 				//$this->logic_ding->sendToDing("独立站获取订单的店铺执行请求参数【".$name."】".json_encode($post));
 				//$this->logic_ding->sendToDing("独立站获取订单的店铺执行获取信息".$res);
-				
 				curl_close($ch);
 				$res = json_decode($res,true);
 
@@ -532,8 +531,8 @@ function __construct(){
 			curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
 			curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($post));
 			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-			curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1800000);
-			$res = curl_exec($ch);
+			curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,600); //只等待10分钟 
+			
 			//$this->logic_ding->sendToDing("测试获取magento订单".$res);
 			curl_close($ch);
    	    	if($res)