Download the PHP package pidongqq/codeigniter-queue-job without Composer
On this page you can find all versions of the php package pidongqq/codeigniter-queue-job. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pidongqq/codeigniter-queue-job
More information about pidongqq/codeigniter-queue-job
Files in pidongqq/codeigniter-queue-job
Package codeigniter-queue-job
Short Description CodeIgniter Quick and Convenient Queue Installation Package
License MIT
Informations about the package codeigniter-queue-job
codeigniter-queue-job
CodeIgniter Quick and Convenient Queue Installation Package
本包最终目的是能像Laravel那样的方式快速实现CodeIgniter的队列(目前主要基于redis驱动,后续或继续加入数据库等其他驱动方式) 依赖 yidas/codeigniter-queue-worker和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
,例如:
创建任务
使用指定连接
queue.php连接配置
启动队列程序
在项目根目录执行
需要配置队列程序其他参数,比如worker子进程的数量,队列监听器没有任务时多久触发下次读取任务 或者需要复写队列程序的一些功能,请先参考yidas/codeigniter-queue-worker
关于marsanla/Codeigniter-jobQueue,因修改了逻辑和修复了一些bug,请勿直接使用该库文,应使用本包中修改过的。具体指令,如查询当前队列名,或者当前队列中任务状态等,可进入marsanla/Codeigniter-jobQueue查看
鸣谢
yidas/codeigniter-queue-worker marsanla/Codeigniter-jobQueue