octava/job-queue-bundle
Composer 安装命令:
composer require octava/job-queue-bundle
包简介
One more wrapper for jms/job-queue-bundle
README 文档
README
One more wrapper for jms/job-queue-bundle. Global aim is working with multi-server architecture of you project. For example, cache:clear command needs to run for all your server. In this case job queue means server.
$manager = $container->get('octava_bundle_job_queue.manager'); $job = new Job('cache:clear'); $jobs = $manager->broadcast($job); //create job for all queues or $jobs = $manager->distinct($job); //create job for a default queue $manager->flush($jobs);
Installation
You can easily install OctavaJobQueueBundle with composer. Just add the following to your composer.jsonfile:
// composer.json { // ... "require": { // ... "jms/job-queue-bundle": "^2.0-@dev", "octava/job-queue-bundle": "3.0.x-dev" } }
Put your server list as list of queue and define a default_queue.
#parameters.yml parameters: #... default_queue: web-server1 #config.yml jms_job_queue: queue_options: web-server1: ~ web-server2: ~ web-server3: ~ octava_job_queue: default_queue: '%default_queue%' #web-server1
Then, you can install the new dependencies by running composer’s update command from the directory where your composer.json file is located:
composer update jms/job-queue-bundle octava/job-queue-bundle
Now, Composer will automatically download all required files, and install them for you. Next you need to update your AppKernel.php file, and register the new bundle:
<?php // in AppKernel::registerBundles() $bundles = array( // ... new JMS\JobQueueBundle\JMSJobQueueBundle(), new Octava\Bundle\JobQueueBundle\OctavaJobQueueBundle(), // ... );
Have your app/console use JMSJobQueueBundle’s Application:
// use Symfony\Bundle\FrameworkBundle\Console\Application; use JMS\JobQueueBundle\Console\Application;
Finally, use the console command ocatava-job-queue:run for job execution.
octava/job-queue-bundle 适用场景与选型建议
octava/job-queue-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28.42k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2017 年 03 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 octava/job-queue-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 octava/job-queue-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 28.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-27