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: