mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
!286 京东打印
Merge pull request !286 from 杨建炊/fix-release-1.0.0/yjc-migrate
This commit is contained in:
commit
66320bdfcd
@ -191,14 +191,19 @@ abstract class BusinessClient
|
|||||||
foreach ($batchParams as $param) {
|
foreach ($batchParams as $param) {
|
||||||
$options = [
|
$options = [
|
||||||
'headers' => ['Content-type' => 'application/x-www-form-urlencoded;'],
|
'headers' => ['Content-type' => 'application/x-www-form-urlencoded;'],
|
||||||
'form_params' => $param
|
'form_params' => $param,
|
||||||
|
"timeout" => 5
|
||||||
];
|
];
|
||||||
\Illuminate\Support\Facades\Log::info("请求参数",[$options,time()]);
|
\Illuminate\Support\Facades\Log::info("快团团请求参数", [$options, time()]);
|
||||||
$promises[] = $client->postAsync($url, $options);
|
$promises[] = $client->postAsync($url, $options);
|
||||||
}
|
}
|
||||||
if ($promises) {
|
if ($promises) {
|
||||||
|
try {
|
||||||
Promise\Utils::unwrap($promises);
|
Promise\Utils::unwrap($promises);
|
||||||
}
|
} catch (\Exception $e) {
|
||||||
\Illuminate\Support\Facades\Log::info("请求结束",[time()]);
|
\Illuminate\Support\Facades\Log::error("快团团请求过程中出现错误: " . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\Illuminate\Support\Facades\Log::info("快团团请求结束", [time()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user