设置了retry_time和max_co的时候,触发重试会报错"You can't enqueue a waiting request when using the max concurrency control!".
最小化代码:
<?php
go(function() {
$idList = [
'1',
'2',
'3',
'4',
'5',
];
foreach ($idList as $id) {
$urls[] = [
'uri' => 'https://domain/path/ . $id,
];
}
try {
$responses = SaberGM::requests($urls, [
'exception_report' => 0,
'retry_time' => 3,
'max_co' => 2
]);
} catch (Exception $e) {
echo $e->getMessage(); // You can't enqueue a waiting request when using the max concurrency control!
}
});