File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed
Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1818 */
1919
2020
21- define ('STATUSENGINE_WORKER_VERSION ' , '3.0 .0 ' );
21+ define ('STATUSENGINE_WORKER_VERSION ' , '3.1 .0 ' );
2222define ('DS ' , DIRECTORY_SEPARATOR );
2323
2424require_once __DIR__ . DS . 'vendor ' . DS . 'autoload.php ' ;
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ use_redis: 0
3434redis:
3535 address: 127.0.0.1
3636 port: 6379
37+ db: 0
3738
3839############
3940# HISTORY DATA CONFIGURATION
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public function connect() {
5353
5454 $ config = $ this ->Config ->getRedisConfig ();
5555 $ this ->Redis ->connect ($ config ['address ' ], $ config ['port ' ]);
56+ $ this ->Redis ->select ($ config ['db ' ]);
5657 }
5758
5859 /**
Original file line number Diff line number Diff line change @@ -241,7 +241,8 @@ public function getGearmanConfig() {
241241 public function getRedisConfig () {
242242 $ config = [
243243 'address ' => '127.0.0.1 ' ,
244- 'port ' => 6379
244+ 'port ' => 6379 ,
245+ 'db ' => 0
245246 ];
246247
247248 if (isset ($ this ->config ['redis ' ]['address ' ])) {
@@ -252,6 +253,10 @@ public function getRedisConfig() {
252253 $ config ['port ' ] = $ this ->config ['redis ' ]['port ' ];
253254 }
254255
256+ if (isset ($ this ->config ['redis ' ]['db ' ])) {
257+ $ config ['db ' ] = (int )$ this ->config ['redis ' ]['db ' ];
258+ }
259+
255260 return $ config ;
256261 }
257262
You can’t perform that action at this time.
0 commit comments