定制 fk/queue 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fk/queue

Composer 安装命令:

composer require fk/queue

包简介

PHP based queue execution program

关键字:

README 文档

README

Extension can work as yii extension too

  1. 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',
        ]
    ]
]
  1. 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

  1. map of console
# console\config\main.php
return [
    'controllerMap' => [
        'queue' => [
            'class' => 'fk\queue\wrapper\yii2\QueueController'
        ]
    ],
]
  1. 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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固