swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

redis配置多个库,前缀会使用默认的前缀 #256

Closed huazaili closed 6 years ago

huazaili commented 6 years ago
Q A
Bug report? yes/no
Feature request? yes/no
Swoft version x.y.z
Swoole version x.y.z (by php --ri swoole)
PHP version x.y.z (by php -v)
Runtime environment Win10/Mac/CentOS 7/Ubuntu/Docker etc.

Details

Describe what you are trying to achieve and what goes wrong.


# Redis
REDIS_NAME=redis
REDIS_DB=0
REDIS_URI=127.0.0.1:6379,127.0.0.1:6379
REDIS_MIN_ACTIVE=1
REDIS_MAX_ACTIVE=2
REDIS_MAX_WAIT=2
REDIS_MAX_WAIT_TIME=3
REDIS_MAX_IDLE_TIME=60
REDIS_TIMEOUT=3
REDIS_SERIALIZE=1
REDIS_PREFIX=oss_redis_

# upgrade redis node
REDIS_UPGRADE_REDIS_DB=2
REDIS_UPGRADE_REDIS_PREFIX=upgrade_center_

如果我使用REDIS_UPGRADE_REDIS_DB这个,结果发现redis的前缀会用默认的oss_redis_而不是upgrade_center_
huangzhhui commented 6 years ago

https://github.com/swoft-cloud/swoft-component/pull/206