Commit efaaabef authored by lixiaofang's avatar lixiaofang

add

parent 566b330a
...@@ -62,11 +62,12 @@ if __name__ == "__main__": ...@@ -62,11 +62,12 @@ if __name__ == "__main__":
redis_client = set_reply_to_redis() redis_client = set_reply_to_redis()
have_reply = redis_client.get(redis_key1) have_reply = redis_client.get(redis_key1)
result = json.loads(str(have_reply, encoding="utf-8")) if have_reply:
if result: result = json.loads(str(have_reply, encoding="utf-8"))
redis_client.set(redis_key2, json.dumps(reply_data_comment)) if result:
else: redis_client.set(redis_key2, json.dumps(reply_data_comment))
redis_client.set(redis_key1, json.dumps(reply_data_comment)) else:
redis_client.set(redis_key1, json.dumps(reply_data_comment))
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment