소스 검색

增加redis gem文件

abiao 5 년 전
부모
커밋
03d7c20af5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/models/wx_user.rb

+ 2 - 2
app/models/wx_user.rb

@@ -23,8 +23,8 @@ class WxUser < ActiveRecord::Base
 
   def after_update
     #root:Fohow123!@#
-    test_redis = Redis.new(:host=>"redis://r-wz9nmvnbdsek8yl476pd.redis.rds.aliyuncs.com")
-    redis = Redis.new(:host=>"redis://r-wz9nmvnbdsek8yl476pd.redis.rds.aliyuncs.com")
+    test_redis = Redis.new(:host=>"redis://r-wz9nmvnbdsek8yl476pd.redis.rds.aliyuncs.com",:db=>"0",:user=>"root",:password=>"Fohow123!@#")
+    redis = Redis.new(:host=>"redis://r-wz9nmvnbdsek8yl476pd.redis.rds.aliyuncs.com",:db=>"0",:user=>"root",:password=>"Fohow123!@#")
     userKey= format("userinfo_%d",self.id)
     redis.del(userKey)
     test_redis.del(userKey)