douyu / beanstalk
beanstalk
v1.1.0
2022-07-05 03:30 UTC
Requires
- php: >=7.4
- hyperf/async-queue: ^2.1
- hyperf/di: ^2.1
- hyperf/framework: ~2.1
- hyperf/pool: ^2.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- mockery/mockery: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: dev-master
- symfony/var-dumper: ^5.1
README
组件:douyu/beanstalk
composer 安装
cmd:composer require douyu/beanstalk:v1.0.0
发布配置
php bin/hyperf.php vendor:publish douyu/beanstalk
配置异步队列 配置文件:config/autoload/async_queue.php
配置如下,可参看hyperf/async-queue的相关配置与使用
'beanstalk' => [
'driver' => \Douyu\Beanstalk\BeanstalkDriver::class,
'beanstalk' => [
'pool' => 'default'
],
'channel' => 'btqueue',
'tube' => 'default',
'timeout' => 2,
'retry_seconds' => [1, 5, 10],
'handle_timeout' => 10,
'processes' => 1,
'concurrent' => [
'limit' => 5,
],
]