承接 insidieux/task-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

insidieux/task-bundle

最新稳定版本:0.3.3

Composer 安装命令:

composer require insidieux/task-bundle

包简介

Symfony task bundle

README 文档

README

Overview

The TaskBundle provides infrastructure for simple implementation of delayed tasks

Requirements

  • PHP 7.0 or greater
  • doctrine/orm: ^2.5
  • stof/doctrine-extensions-bundle: ^1.2
  • symfony/config: ^3.3
  • symfony/console: 3.3
  • symfony/dependency-injection: ^3.3
  • symfony/http-kernel: ^3.3
  • symfony/framework-bundle: ^3.3

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

composer require insidieux/task-bundle

Don't forget to make diff and run migrations, for creating tasks queue table

Usage

First of all, you need to add some new namespaces to separate task processing:

task:
  debug: true
  namespaces:
    - 'namespace1'
    - 'namespace2'

After building container, you'll see predefined worker services:

task.worker.namespace1
task.worker.namespace2

You can run them via cron/supervisor. Also you can scale them by passing worker-id to command

$ bin/console task:worker:namespace --id 1
$ bin/console task:worker:namespace --id 2

Create php class extending \TaskBundle\Handler\AbstractHandler and implement perform method Push created handler to queue

$this->getContainer()->get('task.services.pusher')->push(new SomeHandler, 'namespace1');

Roadmap

Changelog

This bundle changelog here

License

This bundle is released under the MIT license

Authors

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-10