Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

队列不执行 #5

Open
duanduan2288 opened this issue Nov 17, 2015 · 2 comments
Open

队列不执行 #5

duanduan2288 opened this issue Nov 17, 2015 · 2 comments

Comments

@duanduan2288
Copy link

我按照例子中写的创建了这个类

class MyJob
{
public function run($job, $data)
{
file_put_contents(dirname(FILE).'/test.txt', '1', FILE_APPEND);
//process $data;
Yii::error($data,'epp');
}
}

然后
Yii::$app->queue->push('\console\jobs\MyJob', ['a', 'b', 'c']);执行这一段,但是并没有执行,不明白为什么

@netyum
Copy link

netyum commented Nov 21, 2015

我建议使用yii2-asynctask

@duanduan2288
Copy link
Author

现在发现了,是我没有执行 queue/work .但是现在问题来了,我怎么自动执行队列

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants