File tree Expand file tree Collapse file tree 9 files changed +18
-11
lines changed Expand file tree Collapse file tree 9 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 11language : php
22os : linux
3+ dist : bionic
34
45jobs :
56 include :
7+ - php : ' 7.1'
8+ env : SWOOLE_VERSION="v4.5.2"
69 - php : ' 7.2'
710 env : SWOOLE_VERSION="v4.5.2"
811 - php : ' 7.3'
912 env : SWOOLE_VERSION="v4.5.2"
1013 - php : ' 7.4'
1114 env : SWOOLE_VERSION="v4.5.2"
15+ - php : ' 7.1'
16+ env : SWOOLE_VERSION="v4.4.19"
1217 - php : ' 7.2'
1318 env : SWOOLE_VERSION="v4.4.19"
1419 - php : ' 7.3'
1520 env : SWOOLE_VERSION="v4.4.19"
1621 - php : ' 7.4'
1722 env : SWOOLE_VERSION="v4.4.19"
23+ - php : ' 7.1'
24+ env : SWOOLE_VERSION="master"
1825 - php : ' 7.2'
1926 env : SWOOLE_VERSION="master"
2027 - php : ' 7.3'
Original file line number Diff line number Diff line change 11# imi-queue
22
33[ ![ Latest Version] ( https://img.shields.io/packagist/v/imiphp/imi-queue.svg )] ( https://packagist.org/packages/imiphp/imi-queue )
4- [ ![ Php Version] ( https://img.shields.io/badge/php-%3E=7.2 -brightgreen.svg )] ( https://secure.php.net/ )
4+ [ ![ Php Version] ( https://img.shields.io/badge/php-%3E=7.1 -brightgreen.svg )] ( https://secure.php.net/ )
55[ ![ Swoole Version] ( https://img.shields.io/badge/swoole-%3E=4.4.0-brightgreen.svg )] ( https://github.com/swoole/swoole-src )
66[ ![ IMI License] ( https://img.shields.io/github/license/imiphp/imi-queue.svg )] ( https://github.com/imiphp/imi-queue/blob/master/LICENSE )
77
Original file line number Diff line number Diff line change 6868 // 队列名称
6969 'test1 ' => [
7070 // 使用的队列驱动
71- 'driver ' => \ Imi \ Queue \ Driver \ RedisQueueDriver::class ,
71+ 'driver ' => ' RedisQueueDriver ' ,
7272 // 消费协程数量
7373 'co ' => 1 ,
7474 // 消费进程数量;可能会受进程分组影响,以同一组中配置的最多进程数量为准
8888 ]
8989 ],
9090 'test2 ' => [
91- 'driver ' => \ Imi \ Queue \ Driver \ RedisQueueDriver::class ,
91+ 'driver ' => ' RedisQueueDriver ' ,
9292 'co ' => 1 ,
9393 'process ' => 1 ,
9494 'timespan ' => 0.1 ,
Original file line number Diff line number Diff line change 22namespace Imi \Queue \Driver ;
33
44use Imi \Redis \RedisManager ;
5+ use Imi \Queue \Model \Message ;
6+ use Imi \Bean \Annotation \Bean ;
57use Imi \Queue \Enum \QueueType ;
68use Imi \Queue \Contract \IMessage ;
79use Imi \Queue \Model \QueueStatus ;
810use Imi \Util \Traits \TDataToProperty ;
911use Imi \Queue \Exception \QueueException ;
10- use Imi \Queue \Model \Message ;
1112
1213/**
1314 * Redis 队列驱动
15+ *
16+ * @Bean("RedisQueueDriver")
1417 */
1518class RedisQueueDriver implements IQueueDriver
1619{
Original file line number Diff line number Diff line change 11<?php
22namespace Imi \Queue \Model ;
33
4- use Imi \Queue \Driver \RedisQueueDriver ;
5-
64class QueueConfig
75{
86 /**
@@ -17,7 +15,7 @@ class QueueConfig
1715 *
1816 * @var string
1917 */
20- private $ driver = RedisQueueDriver::class ;
18+ private $ driver = ' RedisQueueDriver ' ;
2119
2220 /**
2321 * 消费协程数量
Original file line number Diff line number Diff line change 55use Imi \Bean \Annotation \Bean ;
66use Imi \Queue \Model \QueueConfig ;
77use Imi \Queue \Driver \IQueueDriver ;
8- use Imi \Queue \Driver \RedisQueueDriver ;
98use Imi \Queue \Exception \QueueException ;
109
1110/**
Original file line number Diff line number Diff line change 11<?php
22return [
33 'beanScan ' => [
4+ 'Imi\Queue\Driver ' ,
45 'Imi\Queue\Enum ' ,
56 'Imi\Queue\Service ' ,
67 'Imi\Queue\Annotation ' ,
Original file line number Diff line number Diff line change 33
44use Imi \App ;
55use Imi \Queue \Driver \IQueueDriver ;
6- use Imi \Queue \Driver \RedisQueueDriver ;
76
87class RedisQueueTest extends BaseQueueTest
98{
109 protected function getDriver (): IQueueDriver
1110 {
12- return App::getBean (RedisQueueDriver::class , 'imi-queue-test ' );
11+ return App::getBean (' RedisQueueDriver ' , 'imi-queue-test ' );
1312 }
1413}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ go(function() use(&$statusCode){
2828 {
2929 require $ phpunitPath ;
3030 }
31- PHPUnit \TextUI \Command::main ();
31+ PHPUnit \TextUI \Command::main (false );
3232 } catch (\Swoole \ExitException $ e ) {
3333 $ statusCode = $ e ->getStatus ();
3434 }
You can’t perform that action at this time.
0 commit comments