每过一天 叮咛自己再怂一点
🇨🇳 China Shenzhen・Web developer -> Backend developer -> Web developer
:rocket: An async-queue library built on top of swoole, flexable multi-consumer, coroutine supported. 基于 Swoole 的一个异步队列库,可弹性伸缩的工作进程池,工作进程协程支持。
License: MIT License
Fatal error: Uncaught TypeError: Return value of "Littlesqx\AintQueue\Console\Command\WorkerListenCommand::execute()" must be of the type int, "NULL" returned. in /Users/xxx/Documents/www/queue/vendor/symfony/console/Command/Command.php:258
不想使用 mogodb
有没有别的方式?
如题
RT
就是推送(new)类或者一个方法的时候,不支持传递参数,后期就直接对这个参数进行处理,
example 里面的代码:
$queue->push(function () {
echo "Hello AintQueue\n";
});
$queue->push(new SimpleJob());
$queue->push(new CoroutineJob());
这几种方式分别怎么传参数
我使用supervisor来保证程序正常执行。
配置里面关键的只有一行
[program:aint-queue]
command=sh queue-start.sh
以下是queue-start.sh里面的内容
./vendor/bin/aint-queue worker:listen --channel=default
config就是用的默认配置
目前会出现多个moniter进程的情况,是我的启动脚本有问题吗?
public function canRetry(int $attempt, $error): bool
{
return false;
}
看代码没太明白这段
Fatal error: Littlesqx\AintQueue\Worker\ConsumerWorker::handle(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "api\jobs\SimpleJob" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in var/project/vendor/littlesqx/aint-queue/src/Worker/ConsumerWorker.php on line 124
看到部分queue状态是reserved,不动了,这个要怎么处理?
大佬,为什么要用到lua?
为什么有用到hexists、zscore等?
$object->getCompressingThreshold()
这个方法是哪来的?
大佬,这个是咋写出来的?深刻理解swoole?
好多看不懂的,有难度
1.使用 http 或者 RPC 方式.塞入任务,并消费队列
2.其他框架直接将任务塞入 redis.由这个东东读取之后自动消费队列
????
另外,稳定吗?可用于生产吗
是否可以提供一个可以运行的docker image?
这几行需要返回整型才行,不太确定这里返回数字要返回什么数字比较好。有合适的话我可以提pr
发现你这个项目很不错,现在swoole首页会放很多应用,需要帮放上去吗 需要联系我qq 393323503
LuaScripts.php remove()方法注释编号错误,出现两个KEYS[2]
@Littlesqx
应该构建镜像的时候进行composer install, 你这边是先install 然后构建镜像,这样就会有一个问题,一般本地环境是没有swoole扩展的,所以第一步就不会成功
刚看到安装了下,运行 bin/aint-queue queue:dashboard
提示这个错误~~
我有创建config/aint-queue.php 文件
如题,这是bug吗?supervisor跑一段时间后会有很多monitor进程
抛出异常是不是就是任务失败了?
随运行时间增长,aint-queue:monitor进程越来越多,占用了大量内存
root 1373 1 0 18:40 ? 00:00:00 aint-queue: monitor#default
root 2952 1 0 18:45 ? 00:00:00 aint-queue: monitor#default
root 4504 1 0 18:50 ? 00:00:00 aint-queue: monitor#default
root 5992 1 0 18:55 ? 00:00:00 aint-queue: monitor#default
root 7442 7441 2 19:00 ? 00:00:02 aint-queue: master#default
root 7456 7442 0 19:00 ? 00:00:00 aint-queue: monitor#default
root 7457 7442 0 19:00 ? 00:00:00 aint-queue: consumer#default
root 7458 7442 0 19:00 ? 00:00:00 aint-queue: consumer#default
root 7459 7442 0 19:00 ? 00:00:00 aint-queue: consumer#default
root 7460 7442 0 19:00 ? 00:00:00 aint-queue: consumer#default
root 7461 7442 0 19:00 ? 00:00:00 aint-queue: consumer#default
我用的是supervisor来执行sh queue-start.sh脚本
queue-start.sh脚本内容如下:
./vendor/bin/aint-queue worker:listen --channel=default
Using version ^1.1 for littlesqx/aint-queue
Root package 'littlesqx/aint-queue' cannot require itself in its composer.json
I think "A async-queue library" should be "An async-queue library"
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.