Closed jianhuihi closed 6 years ago
task_ipc_mode=2会出现问题
task_ipc_mode=1则正常
测试代码 task
public function deliverCo(string $p1, string $p2) { sleep(10); return sprintf('deliverCo-%s-%s', $p1, $p2); }
controller
public function getuser() { set_time_limit(0); $number = range(1, 50); foreach ($number as $key => $value) { $re[] = Task::deliver('sync', 'deliverCo', [$value, 2], Task::TYPE_ASYNC); } return $re; }
swoft: 1.0.0, php: 7.1.14, swoole: 2.1.1
@jianhuihi 测试 task_ipc_mode = 1/2 的时候, 表现是相同的, 你说的 投递任务变慢 是什么情况?
@jianhuihi 问题已经复现,我们尽快修复。
建议使用非队列模式!
task_ipc_mode=2会出现问题
task_ipc_mode=1则正常
测试代码 task
controller
swoft: 1.0.0, php: 7.1.14, swoole: 2.1.1