定制 aoepeople/aoe_queue 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

aoepeople/aoe_queue

Composer 安装命令:

composer require aoepeople/aoe_queue

包简介

Generic queue based on Zend_Queue

关键字:

README 文档

README

How to run unit tests

cd <MagentoDocRoot>

# Get phpunit
wget http://pear.phpunit.de/get/phpunit.phar
chmod +x phpunit.phar

# Run tests
./phpunit.phar tests/Aoe_Queue/QueueTestcase.php

Adding a task to the queue

$queue = Mage::getModel('aoe_queue/queue'); /* @var $queue Aoe_Queue_Model_Queue */
$queue->addTask('aoe_queue/dummy::test', array('-+', '5'));

Processing the queue

$queue = Mage::getModel('aoe_queue/queue'); /* @var $queue Aoe_Queue_Model_Queue */
$messages = $queue->receive(5); /* @var $messages Zend_Queue_Message_Iterator */
foreach ($messages as $message) { /* @var $message Aoe_Queue_Model_Message */
    $message->execute();
}

Cron configuration

In System > Configuration > Advanced > System > Queue

Use Aoe_Scheduler to run a separate cronjob to process the aoe_queue task so this won't block the other tasks.

统计信息

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

GitHub 信息

  • Stars: 35
  • Watchers: 47
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-08-24