Commit 4d7ac41c authored by lixiaofang's avatar lixiaofang

add

parent df1de18a
import pymysql import pymysql
import traceback import traceback
import logging import logging
import datetime
import json import json
from log_settings import * from log_settings import *
from auto_request import login, reply, get_comment, time_conv, get_answer_data, reply_answer, set_reply_to_redis from auto_request import login, reply, get_comment, time_conv, get_answer_data, reply_answer, set_reply_to_redis
...@@ -61,6 +62,7 @@ if __name__ == "__main__": ...@@ -61,6 +62,7 @@ if __name__ == "__main__":
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]}) {"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]})
redis_client = set_reply_to_redis() redis_client = set_reply_to_redis()
redis_client.hset(redis_key1, str(numtime1), reply_data_comment) now = datetime.datetime.now().minute
redis_client.hset(redis_key1, str(now), 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