File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,16 +41,13 @@ abstract class Driver implements DriverInterface
4141
4242 protected $ logger ;
4343
44- public function __construct ($ config = [])
44+ public function __construct ($ config = [], $ listener = [] )
4545 {
4646 $ this ->packer = new Packer ();
4747 $ this ->config = $ config ;
4848 $ this ->logger = Logger::instance ();
4949 $ provider = new ListenerProviderFactory ;
50- $ listeners = $ provider ([
51- QueueHandleListener::class,
52- QueueLengthListener::class,
53- ]);
50+ $ listeners = $ provider ($ listener );
5451 $ this ->event = new EventDispatcher ($ listeners , $ this ->logger );
5552 }
5653
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ class RedisDriver extends Driver
3838 */
3939 protected $ handleTimeout ;
4040
41- public function __construct ($ config = [])
41+ public function __construct ($ config = [], $ listener = [] )
4242 {
43- parent ::__construct ($ config );
43+ parent ::__construct ($ config, $ listener );
4444 $ this ->initRedis ();
4545 $ this ->timeout = 5 ;
4646 $ this ->retrySeconds = 10 ;
You can’t perform that action at this time.
0 commit comments