浏览代码

redis连接测试

abiao 5 年之前
父节点
当前提交
75b987c668
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/models/wx_user.rb

+ 2 - 2
app/models/wx_user.rb

@@ -22,8 +22,8 @@ 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")
+    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")
     userKey= format("userinfo_%d",self.id)
     redis.del(userKey)
     test_redis.del(userKey)