hyperf / hyperf/task

在多进程的task任务中,存在获取数据异常问题

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9
Forks
2
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/7343318/175453541-e77c600f-359b-410e-ac1c-11f29e2f23bd.png)

遇到一个比较极限的问题,在多进程的task任务中,存在获取数据异常问题。

swoole官方文档上对task_id的产生描述是这样的:
![image](https://user-images.githubusercontent.com/7343318/175453766-14b8ce09-772f-4909-a614-f059fa54d709.png)

根据以上描述可以理解为:在多进程的task任务中,每个task_id在其task进程内是唯一的,其它进程可能是不唯一的,则可以判断此处逻辑存在问题`$result = $this->factory->pop($taskId, $timeout);`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.