We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我按照例子中写的创建了这个类
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']);执行这一段,但是并没有执行,不明白为什么
The text was updated successfully, but these errors were encountered:
我建议使用yii2-asynctask
Sorry, something went wrong.
现在发现了,是我没有执行 queue/work .但是现在问题来了,我怎么自动执行队列
No branches or pull requests
我按照例子中写的创建了这个类
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']);执行这一段,但是并没有执行,不明白为什么
The text was updated successfully, but these errors were encountered: