Commit 5665709 1 parent 8c18fa0 commit 5665709 Copy full SHA for 5665709
File tree 3 files changed +15
-13
lines changed
3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,18 @@ public function __construct(
26
26
int $ port ,
27
27
string $ user ,
28
28
string $ password ,
29
- string $ vhost
29
+ string $ vhost ,
30
+ float $ heartbeat ,
31
+ float $ timeout
30
32
) {
31
- $ this ->host = $ host ;
32
- $ this ->port = $ port ;
33
- $ this ->user = $ user ;
34
- $ this ->password = $ password ;
35
- $ this ->vhost = $ vhost ;
36
-
37
33
$ this ->bunnyClient = new Bunny \Client ([
38
- 'host ' => $ this ->host ,
39
- 'port ' => $ this ->port ,
40
- 'user ' => $ this ->user ,
41
- 'password ' => $ this ->password ,
42
- 'vhost ' => $ this ->vhost ,
34
+ 'host ' => $ host ,
35
+ 'port ' => $ port ,
36
+ 'user ' => $ user ,
37
+ 'password ' => $ password ,
38
+ 'vhost ' => $ vhost ,
39
+ 'heartbeat ' => $ heartbeat ,
40
+ 'timeout ' => $ timeout ,
43
41
]);
44
42
45
43
$ this ->bunnyClient ->connect ();
Original file line number Diff line number Diff line change @@ -68,7 +68,9 @@ private function create(string $name): Connection
68
68
(int ) $ connectionData ['port ' ],
69
69
$ connectionData ['user ' ],
70
70
$ connectionData ['password ' ],
71
- $ connectionData ['vhost ' ]
71
+ $ connectionData ['vhost ' ],
72
+ $ connectionData ['heartbeat ' ],
73
+ $ connectionData ['timeout ' ]
72
74
);
73
75
}
74
76
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ final class ConnectionsHelper extends AbstractHelper
27
27
'user ' => 'guest ' ,
28
28
'password ' => 'guest ' ,
29
29
'vhost ' => '/ ' ,
30
+ 'timeout ' => 1 ,
31
+ 'heartbeat ' => 60.0 ,
30
32
];
31
33
32
34
You can’t perform that action at this time.
0 commit comments