定制 pmg/pheanstalk-bundle 二次开发

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

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

pmg/pheanstalk-bundle

Composer 安装命令:

composer require pmg/pheanstalk-bundle

包简介

A simple bundle that integrate Pheanstalk with Symfony

README 文档

README

An extremely simple Symfony bundle that puts one or more Pheanstalk connections into your Symfony application.

If you're looking for something more full featured, check out LeezyPheanstalkBundle.

Installation

1. Download the Bundle

composer require pmg/pheanstalk-bundle

2. Enable the Bundle

<?php
// app/AppKernel

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new PMG\PheanstalkBundle\PmgPheanstalkBundle(),
        ];

        // ...

        return $bundles;
    }

    // ...
}

Configuration

By default the bundle will provide you with one Pheanstalk\Pheanstalk named pmg_pheanstalk in the container. This connects to localhost on the default 11300 port.

Single Connection Example

# Default configuration for "PmgPheanstalkBundle"
pmg_pheanstalk:
    # The connection's host.
    host:                 localhost

    # The connection's port.
    port:                 11300

    # The connection's timeout.
    timeout:              null

    # Whether or not to keep the connection's socket around between requests. See http://php.net/manual/en/function.pfsockopen.php
    persist:              false

Multiple Connections

# Default configuration for "PmgPheanstalkBundle"
pmg_pheanstalk:
    # The default connection that will be made available at the `pmg_pheanstalk` service
    default_connection:   default
    connections:
        # use the default configuration
        default: ~

        # another connection, will be put at the `pmg_pheanstalk.another` service
        another:
            host: anotherServier.com
            port: 11301

Statistic Endpoints

This bundle includes a few basic endpoints that return JSON data that provides information about the queue tubes. Each endpoint also allows for a connection parameter to be supplied. If it is not, the default connection is used.

Enabling the endpoints

Add the following line to your routing.xml file. (Or equivalent YML file)

   <import resource="@PmgPheanstalkBundle/Resources/config/routing.yml">
        <default key="_format">json</default>
   </import>

Available endpoints

  • [GET] /{tube} - Provides all information from beanstalkd about the given tube
  • [GET] / - Provides all information about all tubes from beanstalkd

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-08-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固