PHPackages                             pidongqq/codeigniter-queue-job - 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. pidongqq/codeigniter-queue-job

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

pidongqq/codeigniter-queue-job
==============================

CodeIgniter Quick and Convenient Queue Installation Package

v1.0.0(7y ago)341MITPHP

Since Mar 31Pushed 7y agoCompare

[ Source](https://github.com/pidongqianqian/codeigniter-queue-job)[ Packagist](https://packagist.org/packages/pidongqq/codeigniter-queue-job)[ RSS](/packages/pidongqq-codeigniter-queue-job/feed)WikiDiscussions master Synced 2d ago

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

codeigniter-queue-job
=====================

[](#codeigniter-queue-job)

CodeIgniter Quick and Convenient Queue Installation Package

本包最终目的是能像Laravel那样的方式快速实现CodeIgniter的队列（目前主要基于redis驱动，后续或继续加入数据库等其他驱动方式） 依赖 [yidas/codeigniter-queue-worker](https://github.com/yidas/codeigniter-queue-worker)和[marsanla/Codeigniter-jobQueue](https://github.com/marsanla/Codeigniter-jobQueue)

安装/配置
-----

[](#安装配置)

1.安装composer包

```
composer require pidongqq/codeigniter-queue-job

```

2.复制本包libraries目录下mcurl.php文件和Redis.php文件到项目框架application\\libraries中

3.复制本包config目录下配置文件queue.php到项目框架application\\config中

使用
--

[](#使用)

创建任务所在的控制器需继承`Pidong\Queue\QueueController`,例如：

```
class Task extends Pidong\Queue\QueueController
{
  \\your business code
}
```

创建任务

```
$this->dispatch($queueName, $controller, $method, $params);
//$queueName (string): 是队列名称（你可能需要不同的队列）
//$controller/$method(string): 队列最终执行会在你指定的$controller/$method中处理
//$params (array): 是你希望在队列中存的信息或参数
//在$controller/$method获取参数使用$_POST
```

使用指定连接

```
$this->onConnection($connectName)->dispatch($queueName, $controller, $method, $params);
//使用指定连接时，你需要现在config/queue.php添加该连接（该配置文件来自 安装 第3步）
//！！！注意：要先使用onConnection再dispatch
```

queue.php连接配置

```
  $config['queue_connections'] = [
      'default' => [
          'host'     => 'localhost',
          'port'     => '6379',
          'password' => ''
      ]
  ];
  //可以按照此格式，添加更多连接
```

### 启动队列程序

[](#启动队列程序)

在项目根目录执行

```
  $ php public/index.php Pidong/Queue/Controller/launch //开启后台程序，监听任务并执行worker

  //只启动监听程序
  $ php public/index.php Pidong/Queue/Controller/listen
  //只启动worker
  $ php public/index.php Pidong/Queue/Controller/worker

```

需要配置队列程序其他参数，比如worker子进程的数量，队列监听器没有任务时多久触发下次读取任务 或者需要复写队列程序的一些功能，请先参考[yidas/codeigniter-queue-worker](https://github.com/yidas/codeigniter-queue-worker)

关于[marsanla/Codeigniter-jobQueue](https://github.com/marsanla/Codeigniter-jobQueue)，因修改了逻辑和修复了一些bug，请勿直接使用该库文，应使用本包中修改过的。具体指令，如查询当前队列名，或者当前队列中任务状态等，可进入[marsanla/Codeigniter-jobQueue](https://github.com/marsanla/Codeigniter-jobQueue)查看

鸣谢
--

[](#鸣谢)

[yidas/codeigniter-queue-worker](https://github.com/yidas/codeigniter-queue-worker)[marsanla/Codeigniter-jobQueue](https://github.com/marsanla/Codeigniter-jobQueue)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% 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

Unknown

Total

1

Last Release

2648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36aa6162da28eabf9edc6aca74357578e9561de99c6178b519e7868a64e6542e?d=identicon)[pidong](/maintainers/pidong)

---

Top Contributors

[![Oliver1802](https://avatars.githubusercontent.com/u/131143087?v=4)](https://github.com/Oliver1802 "Oliver1802 (9 commits)")[![pidongqianqian](https://avatars.githubusercontent.com/u/20850873?v=4)](https://github.com/pidongqianqian "pidongqianqian (8 commits)")

### Embed Badge

![Health badge](/badges/pidongqq-codeigniter-queue-job/health.svg)

```
[![Health](https://phpackages.com/badges/pidongqq-codeigniter-queue-job/health.svg)](https://phpackages.com/packages/pidongqq-codeigniter-queue-job)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M509](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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