swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 788 forks source link

无法在命令模式下使用TASK任务投递。 #155

Closed yangshen1987 closed 6 years ago

yangshen1987 commented 6 years ago
Q A
Bug report? yes
Feature request? yes
Swoft version 1.0.0
Swoole version 2.1.2-alpha
PHP version 7.2.3
Runtime environment Ubuntu

Details Fatal error: Uncaught Error: Call to a member function getServer() on null in /home/alex/workspace/codes/swoft/vendor/swoft/task/src/Task.php:39 Stack trace:

Provide minimal script to reproduce the issue

  public function taskTest(){
        $result  = Task::deliver('sync', 'deliverCo', ['p', 'p2'], Task::TYPE_ASYNC);
        echo $result;
    }
stelin commented 6 years ago

@yangshen1987 已支持,https://doc.swoft.org/master/zh-CN/console/task.html