定制 hidalgo-rides/intersect-queue 二次开发

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

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

hidalgo-rides/intersect-queue

Composer 安装命令:

composer require hidalgo-rides/intersect-queue

包简介

Queue processing system that allows cron-like processors to be defined and ran using a single script entry point.

README 文档

README

Intersect Queue is a queue processing system that allows cron-like processors to be defined and ran using a single script entry point.

Changelog

See CHANGELOG.md for all released features/bug fixes

Installation via Composer

composer require hidalgo-rides/intersect-queue

Usage

Create custom processors

Create your own custom processors to perform any actions you want to perform at reoccurring times

<?php

class SampleProcessor implements \Intersect\Queue\QueueProcessor {
    
    public function getFrequency()
    {
        // every five minutes
        return '*/5 * * * *';
    }

    public function process()
    {
        // do custom things here like query database records to
        // perform actions, update stats, or whatever you want
    }
    
}

Register and run processors with the QueueManager

Create a script to initialize the QueueManager and register all your custom processors

<?php

// initialize QueueManager
$queueManager = new \Intersect\Queue\QueueManager();

// register processor
$queueManager->registerProcessor(new SampleProcessor());

// run QueueManager
$queueManager->run();

Setup cron to invoke QueueManager script every minute

* * * * * php /path/to/queue/manager/script.php >> /dev/null 2>&1

License

Intersect Framework is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固