hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No idle task worker is available

kuaifan opened this issue · comments

  1. Your software version (Screenshot of your startup)

    Software Version
    PHP 8.1
    Swoole 5.0.0-dev
    Laravel/Lumen 9
  2. Detail description about this issue(error/log)

    image

  3. Some reproducible code blocks and steps

    class TestTask extends Task
      {
          protected $title;
      
          public function __construct($title)
          {
              $this->title = $title;
          }
      
          public function handle()
          {
              sleep(rand(1, 3));
              info($this->title . ". " . date("Y-m-d H:i:s"));
          }
      }
    
        //--------------
    
        $title = Base::generatePassword(2, 22);
        for($i = 1; $i <= 1000; $i++) {
            $t = new TestTask($title . '-' . $i);
            $t->delay(rand(1, 3));
            Task::deliver($t);
        }