File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,19 @@ const redisInit = async function() {
2121 const RDS_HOST = conf . redis_host ;
2222 const RDS_PORT = conf . redis_port ;
2323 const RDS_PWD = conf . redis_password ;
24+ const RDS_DB = conf . redis_db ;
2425 const RDS_OPTS = {
2526 auth_pass : RDS_PWD ,
2627 } ;
2728
2829 if ( RDS_PWD ) {
2930 redisClientInstance = createClient ( {
30- url : `redis://:${ RDS_PWD } @${ RDS_HOST } :${ RDS_PORT } /0` ,
31+ url : `redis://:${ RDS_PWD } @${ RDS_HOST } :${ RDS_PORT } /${ RDS_DB } ` ,
3132 } ) ;
3233 } else {
33- redisClientInstance = createClient ( { } ) ;
34+ redisClientInstance = createClient ( {
35+ url : `redis://${ RDS_HOST } :${ RDS_PORT } /${ RDS_DB } ` ,
36+ } ) ;
3437 }
3538
3639 redisClientInstance . on ( 'error' , err => {
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ tl_rtc_app_redis_host=localhost
2121tl_rtc_app_redis_port = 6379
2222# # redis auth密码
2323tl_rtc_app_redis_password =
24+ # # redis db 默认0
25+ tl_rtc_app_redis_db = 0
2426
2527
2628# -----------------以下为webrtc相关配置-----------------#
You can’t perform that action at this time.
0 commit comments