ilzrv/php-bull-queue 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ilzrv/php-bull-queue

最新稳定版本:v1.0.0-rc.2

Composer 安装命令:

composer require ilzrv/php-bull-queue

包简介

PHP Job Creator For Bull Queue

README 文档

README

Latest Stable Version Total Downloads License

At the moment this library provides the ability to add jobs to the Bull Queue.

Requirements

Installation

You can install the package via composer:

composer require ilzrv/php-bull-queue

Usage

To add a job to the queue, you can use the following example:

<?php

use Ilzrv\PhpBullQueue\Queue;

$videoQueue = new Queue('videoQueue');

$videoQueue->add(Queue::DEFAULT_JOB_NAME, [
    'video' => 'http://example.com/video1.mov'
]);

If you want to use predis as Redis client (example configuration):

<?php

use Ilzrv\PhpBullQueue\Queue;
use Ilzrv\PhpBullQueue\DTOs\QueueOpts;
use Ilzrv\PhpBullQueue\DTOs\RedisConfig;

$videoQueue = new Queue(
    'videoQueue',
    new QueueOpts([
        'redis' => new RedisConfig([
            'client' => 'predis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'password' => '',
        ]),
    ])
);

$videoQueue->add(Queue::DEFAULT_JOB_NAME, [
    'video' => 'http://example.com/video1.mov'
]);

Configurations

All is configured via classes:

  • Ilzrv\PhpBullQueue\DTOs\RedisConfig
  • Ilzrv\PhpBullQueue\DTOs\QueueOpts
  • Ilzrv\PhpBullQueue\DTOs\JobOpts

RedisConfig

  • client (string) Redis client. Can be phpredis or predis. Default: phpredis
  • host (string) Redis host. Default: 127.0.0.1
  • port (int) Redis port. Default: 6379
  • password (string) Redis password. Default: ''

QueueOpts

  • redis (RedisConfig Object) Redis Configuration.
  • prefix (string) Queue prefix. Default: bull

JobOpts

  • customJobId (string) Custom JobId. Default: 0
  • priority (int) Job priority. Default: 0
  • lifo (bool) Last In, First Out. Default: false
  • attempts (int) Job attempts. Default: 1
  • timestamp (int) Current timestamp.
  • delay (int) Job delay. Default: 0

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固