Message queue system written in PHP for webman.
webman-php / redis-queue Goto Github PK
View Code? Open in Web Editor NEWMessage queue system written in PHP for webman.
Home Page: https://www.workerman.net/webman
Message queue system written in PHP for webman.
Home Page: https://www.workerman.net/webman
Message queue system written in PHP for webman.
大佬,把这个直接改成stream 的吧,专门做队列
restart 报错了
Class 'support\Container' not found in webman/redis-queue/src/Process/Consumer.php:56
无法下载呀?需要token
` Failed to download workerman/redis from dist: curl error 7 while downloading https://api.github.com/repos/walkor/redis/zipball/f28f9d71ad6cd7431e1974ade8d30bca98dec49a: Failed to connect to api.github.com port 443: Connection re
fused
Now trying to download from source
这是啥意思?
文档中也没有日志文件的相关配置
我这边在拉取延迟队列的时候发现消费的比较慢,看了一下源码一次性只拉取了128个,想咨询一下大佬这样设计的想法是啥?
$retry_timer = Timer::add(1, function () {
$now = time();
$options = ['LIMIT', 0, 128];
$this->_redisSend->zrevrangebyscore(static::QUEUE_DELAYED, $now, '-inf', $options, function($items){
if ($items === false) {
throw new RuntimeException($this->_redisSend->error());
}
foreach ($items as $package_str) {
$this->_redisSend->zRem(static::QUEUE_DELAYED, $package_str, function ($result) use ($package_str) {
if ($result !== 1) {
return;
}
$package = \json_decode($package_str, true);
if (!$package) {
$this->_redisSend->lPush(static::QUEUE_FAILD , $package_str);
return;
}
$this->_redisSend->lPush(static::QUEUE_WAITING . $package['queue'], $package_str);
});
}
});
});
Creation of dynamic property Workerman\Redis\Client::$brPoping is deprecated
发现项目没有license文件,建议添加一下
$class = str_replace('/', "\\", substr(substr($file, strlen(base_path())), 0, -4));
$class = str_replace([base_path(), '/', '.php'], ["", "\\", ''], $file);
这样看起来更容易明白
过期没有被成功执行的队列,会在有消费者是集中并发执行,这是正常的吗?
尝试以下操作
debug=>false
error_reporting=>1024
这个是webman的错误打印配置
trigger_error("超时重试2",E_USER_NOTICE)
还是会打印错误堆栈
找寻源码 webman/queue
是对 workerman/redis-queue
的优雅封装,搞不定
因为我已经选择主动抛出异常重试,堆栈信息是否保存到redis起码可选的吧~ redis - fail表体积爆炸
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.