fk/queue
Composer 安装命令:
composer require fk/queue
包简介
PHP based queue execution program
关键字:
README 文档
README
Extension can work as yii extension too
- register as a component
# main.php return [ 'components' => [ 'queue' => [ 'class' => 'fk\queue\wrapper\yii2\Connection', 'logPath' => '@console/runtime/logs/queue.log', 'engine' => 'fk\queue\engines\Redis', ] ] ]
- queue in
Yii::$app->queue->in('ls -l'); // bash> ls -l Yii::$app->queue->in(new YiiCommand(['migrate'])); // bash> php yii migrate
You can write your own XXCommand to parse a command, but in the end, a bash command should be returned
If the argument for in is empty, then the cmd will be ignored
- map of console
# console\config\main.php return [ 'controllerMap' => [ 'queue' => [ 'class' => 'fk\queue\wrapper\yii2\QueueController' ] ], ]
- queue start
php yii queue/start
Command
Writing your own command by extends \fk\queue\commands\Command and overwrite method CommandInterface::parse
<?php class MyCommand extends \fk\queue\commands\Command { public $command; public function parse() { // Parse your command with its property `command` } }
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-20