No idle task worker is available
kuaifan opened this issue · 0 comments
kuaifan commented
-
Your software version (Screenshot of your startup)
Software Version PHP 8.1 Swoole 5.0.0-dev Laravel/Lumen 9 -
Detail description about this issue(error/log)
-
Some
reproducible
code blocks andsteps
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); }