新增防止并发请求数据

master
chenzhi 5 years ago
parent e3022cb6c2
commit 5ef1aa6e22

@ -211,6 +211,8 @@ class CompanyStatementSetController extends Controller {
]; ];
$dataurl .= $this->cpapihost."&".http_build_query($arr); $dataurl .= $this->cpapihost."&".http_build_query($arr);
$html = file_get_contents($dataurl); $html = file_get_contents($dataurl);
//防止并发压力
sleep(5);
$rsp = json_decode($html,true); $rsp = json_decode($html,true);
if($rsp['code'] != 1){ if($rsp['code'] != 1){
echo $rsp['error'].PHP_EOL;die; echo $rsp['error'].PHP_EOL;die;

Loading…
Cancel
Save