Skip to content
New issue

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

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

Already on GitHub? # to your account

增加onConsumeFailure方法,适配最新版本 #15

Merged
merged 6 commits into from
Feb 28, 2024

Conversation

lengqiuqiuqiu
Copy link
Contributor

@lengqiuqiuqiu lengqiuqiuqiu commented Feb 28, 2024

增加onConsumeFailure方法,适配最新版本的redis-queue,可选.

@@ -62,9 +63,12 @@ public function onWorkerStart()
$queue = $consumer->queue;
$connection = Client::connection($connection_name);
$connection->subscribe($queue, [$consumer, 'consume']);
//Add onConsumeFailure method to Consumer class in Consumer.php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样写看起来有问题,如果有多个消费者,只有最后一个消费者的onConsumeFailure设置成功,之前的会被覆盖。

@lengqiuqiuqiu
Copy link
Contributor Author

代码已经更改完毕,测试也正常,@walkor老大看看还有没有问题

@walkor walkor merged commit b1fe963 into webman-php:main Feb 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants