Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can't enqueue a waiting request when using the max concurrency control! #145

Open
axpwx opened this issue Apr 25, 2022 · 0 comments
Open

Comments

@axpwx
Copy link

axpwx commented Apr 25, 2022

设置了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!
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant