定制 arko/queue-manager-bundle 二次开发

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

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

arko/queue-manager-bundle

Composer 安装命令:

composer require arko/queue-manager-bundle

包简介

Allows you to create and process callables queues using singleton service

README 文档

README

How to install

Step 1: Download using composer:

composer.phar require arko/queue-manager-bundle "dev-master"

Step 2: Enable the bundle:

<?php
// app/AppKernel.php

public function registerBundle() {
    $bundles = array(
        // ...
        new Arko\QueueManagerBundle\ArkoQueueManagerBundle(),
    );
}

How to use

You should be able to get queue manager service from the service container like this:

$queueManager = $container->get('arko.queue_manager');

Or, as usual, you can inject it in your own service definitions using its id: arko.queue_manager.

From now you can use it to add different actions to the named queues:

$queueManager->add(function() {
    // Do something here
}, 'queue_name');

// ...

$queueManager->add(function() {
    // Do something else, maybe somewhere else.
}, 'queue_name');

As a first argument to the queue manager add method you can provide any php callable.

Later you will be able to process the queue like this:

$queueManager->process('queue_name');

After the queue is processed, it will be cleared. Generally speaking, it will be cleared just before the queue is processed. So, nested queues should work just fine.

统计信息

  • 总下载量: 6.63k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固