2017 © Pedro Peláez
 

yii2-extension fecshop_queue

fecshop queue extension

image

fancyecommerce/fecshop_queue

fecshop queue extension

  • Wednesday, February 28, 2018
  • by fancyecommerce
  • Repository
  • 3 Watchers
  • 4 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 6 Versions
  • 50 % Grown

The README.md

, (*1)

br/, (*2)

Latest Stable Version Total Downloads Latest Unstable Version, (*3)

Fecshop 队列扩展, (*4)

Fecshop queue 功能部分,用于扩展一些队列的功能,将一些比较耗时的操作 拆出来放到队列中,异步解耦, 目前做的功能为:邮件发送。, (*5)

安装

composer require --prefer-dist fancyecommerce/fecshop_queue 

or 在根目录的composer.json中添加, (*6)

"fancyecommerce/fecshop_queue": "~1.0.4"

然后执行, (*7)

composer update

配置文件

将@vendor\fancyecommerce\fecshop_queue\config\fecshop_queue.php 复制到 @common\config\fecshop_third_extensions\fecshop_queue.php(需要创建该文件), (*8)

该文件是扩展的配置文件,通过上面的操作,加入到fecshop的插件配置中。, (*9)

使用

1.配置完成后,就可以使用MQ了,监听命令, (*10)

1.1守护进程监听(响应快,但会长时间占用php进程), (*11)

yii queue/listen [timeout]  // [timeout]:number of seconds to wait a job. 

1.2cron方式监听,可以设置每分钟执行一次(响应有一定的延迟,但不会长时间占用php进程), (*12)

yii queue/run

关于redis消费消息的更多信息参看:yii2 redis queue, (*13)

2.队列软件, (*14)

默配置的是redis队列,你可以使用下面的几种队列软件来实现队列消息 yii2 queue driver, (*15)

3.使用Supervisor,启动管理多个监听进程, (*16)

详细参看:Supervisor, (*17)

4.关于重试规则, (*18)

当一段时间没有执行完成,或者执行失败,队列会安排重试, 在queue组件中配置,, (*19)

    'queue' => [
        'ttr' => 5 * 60, // Max time for anything job handling 
        'attempts' => 3, // Max number of attempts
    ],

更多详细参看:queue重试规则, (*20)

The Versions

28/02 2018

dev-master

9999999-dev https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar terry

yii2 queue fecshop

25/01 2018

1.0.4

1.0.4.0 https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar terry

yii2 queue fecshop

24/01 2018

1.0.3

1.0.3.0 https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar terry

yii2 queue fecshop

24/01 2018

1.0.2

1.0.2.0 https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD 3-Clause

The Requires

 

by Avatar terry

yii2 queue fecshop

10/01 2018

1.0.1

1.0.1.0 https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD 3-Clause

The Requires

  • php >=5.4.0

 

by Avatar terry

yii2 queue fecshop

10/01 2018

1.0.0

1.0.0.0 https://github.com/fecshop/yii2_fecshop_queue

fecshop queue extension

  Sources   Download

BSD 3-Clause

The Requires

  • php >=5.4.0

 

by Avatar terry

yii2 queue fecshop