PHPackages                             blue-nest-cloud/bnc-queue-v1 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. blue-nest-cloud/bnc-queue-v1

ActiveLibrary[Queues &amp; Workers](/categories/queues)

blue-nest-cloud/bnc-queue-v1
============================

Chuckle

v1.1.1(3y ago)06MITPHPPHP &gt;=7.1.0

Since Apr 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Jzh-thub/bnc-queue-v1)[ Packagist](https://packagist.org/packages/blue-nest-cloud/bnc-queue-v1)[ RSS](/packages/blue-nest-cloud-bnc-queue-v1/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

think-queue for ThinkPHP5.1
===========================

[](#think-queue-for-thinkphp51)

原始文档:
===============================================

[](#原始文档httpsgithubcomtop-thinkthink-queue)

安装
--

[](#安装)

> composer require blue-nest-cloud/bnc-queue-v1

配置
--

[](#配置)

> 配置文件位于 `config/queue.php`

### 使用方式

[](#使用方式)

> 立即执行--&gt; Queue::instance()-&gt;do('方法名')-&gt;job('任务执行类名')-&gt;data('执行数据')-&gt;push();

> 延时执行--&gt; Queue::instance()-&gt;do('方法名')-&gt;job('任务执行类名')-&gt;data('执行数据')-&gt;secs('秒')-&gt;push();

> 任务执行类 必须继承 BaseJob

> 更多用法见 源码

监听任务并执行
-------

[](#监听任务并执行)

> php think queue:listen

> php think queue:work

两种，具体的可选参数可以输入命令加 --help 查看

> 可配合supervisor使用，保证进程常驻

> supervisor使用方式:宝塔安装Supervisor,添加守护进程,启动用户www,运行目录:项目根目录,启动命令:php think queue:listen --queue,进程数量:1

### 下面写两个例子

[](#下面写两个例子)

```
class Index{

    public function index(Request $request)
    {
        Queue::instance()->do(index)->job(TestJob::class)->data([1, 2, 3])->push();
        Queue::instance()->do(job)->job(TestJob::class)->data([1, 2, 3],123)->secs(5)->push();
    }
}

clss TestJob extend  BaseJob{

    public function index($data){
        print_r($data);

        //返回true表示消费完成
        return true;
        //返回false表示消费失败 如果未设置失败次数 默认3次失败后 就删除任务
        return false;
    }

    public function job($data,$data1){
        //5秒后才会执行
        print_r($data); //[1,2,3]
        print_r($data1);//123
    }
}

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18be0a4a9d7b5cab20e5f886d8c9a3e1362b5188f6e4c625db8895e7091bc0e5?d=identicon)[Jzh-thub](/maintainers/Jzh-thub)

---

Top Contributors

[![Jzh-thub](https://avatars.githubusercontent.com/u/74651570?v=4)](https://github.com/Jzh-thub "Jzh-thub (3 commits)")

### Embed Badge

![Health badge](/badges/blue-nest-cloud-bnc-queue-v1/health.svg)

```
[![Health](https://phpackages.com/badges/blue-nest-cloud-bnc-queue-v1/health.svg)](https://phpackages.com/packages/blue-nest-cloud-bnc-queue-v1)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M170](/packages/react-async)[amphp/pipeline

Asynchronous iterators and operators.

7432.7M34](/packages/amphp-pipeline)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
