Explorar o código

增加redis gem文件

abiao %!s(int64=5) %!d(string=hai) anos
pai
achega
7171d5ef66
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      app/models/wx_user.rb

+ 3 - 2
app/models/wx_user.rb

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