From 85a92dea6e366c933c0d08e900d024fb294bd186 Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 19 Sep 2019 17:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=91=8A=E4=BD=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8F=82=E6=95=B0=E5=88=A4=E6=96=AD=EF=BC=8C=E6=8B=86?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/reflush_ad.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handler/reflush_ad.py b/handler/reflush_ad.py index fecad1f..60b383b 100644 --- a/handler/reflush_ad.py +++ b/handler/reflush_ad.py @@ -30,7 +30,7 @@ class RelushADinfo(Resource): locationid = self.args['locationid'] if locationid: need_change_keys = set() - key_word = f"ad::*_{locationid}*::*::{locationid}" + key_word = f"ad::*_{locationid}_*::*::{locationid}" adlists = my_redis.keys(key_word) if adlists: for key in adlists: @@ -39,6 +39,7 @@ class RelushADinfo(Resource): if need_change_keys: for one in need_change_keys: key = f"adinfo::{one}::info" + log.info(f"reflush key={key} set expire!") my_redis.expire(key, 1) time.sleep(1) adid = one.split('_')[0] @@ -53,6 +54,7 @@ class RelushADinfo(Resource): for item in self.remove_list: full_info.pop(item) my_redis.hmset(key, full_info) + log.info(f"reflush key ={key} with {full_info}") my_redis.expire(key, self.expired) return jsonify({'code': 200, 'message': f"reflush key locationid={locationid}!"}) else: