hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.
MIT License
3.84k stars 475 forks source link

开启task_enable_coroutine #189

Closed wtry closed 4 years ago

wtry commented 5 years ago
  1. Tell us your software version How to know it?

    # PHP
    php -v
    # Swoole
    php --ri swoole
    # Laravel
    grep 'laravel/framework' composer.json
    # Lumen
    grep 'laravel/lumen-framework' composer.json
    Software Version
    PHP PHP 7.3.9
    Swoole 4.4.5
    Laravel/Lumen 6.0.4
  2. Detail description about this issue(error/log)

    Swoole\Coroutine::create(): Unable to use async-io in task processes, please settask_enable_coroutineto true

[2019-09-25 21:01:24 ^87198.1] ERROR php_swoole_server_rshutdown (ERRNO 503): Fatal error: Uncaught ArgumentCountError: Too few arguments to function Hhxsv5\LaravelS\Swoole\Server::onTask(), 2 passed and exactly 4 expected in /Users/lan/Project/lumen/vendor/hhxsv5/laravel-s/src/Swoole/Server.php:282

  1. Give us a reproducible code block and steps

    //TODO: Your code
    ![image](https://user-images.githubusercontent.com/13792519/65603254-eab1e300-dfd7-11e9-95bd-f56fa8312a67.png)
hhxsv5 commented 5 years ago

除了自定义进程,其他地方不能使用协程,请参考协程