Commit e08a81fd authored by lixiaofang's avatar lixiaofang

add

parent 76f007f0
...@@ -121,7 +121,7 @@ def auto_click(pk_list): ...@@ -121,7 +121,7 @@ def auto_click(pk_list):
pc.close() pc.close()
exec_count = 0 exec_count = 0
if topic_id_list: if topic_id_list:
try:
def fun_timer(): def fun_timer():
cookies = login() cookies = login()
if cookies: if cookies:
...@@ -149,7 +149,8 @@ def auto_click(pk_list): ...@@ -149,7 +149,8 @@ def auto_click(pk_list):
logging.info("----------1-----------") logging.info("----------1-----------")
timer = threading.Timer(10, fun_timer) # 首次启动 timer = threading.Timer(10, fun_timer) # 首次启动
timer.start() timer.start()
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
else: else:
pass pass
except: except:
...@@ -167,13 +168,14 @@ def auto_reply(pk_list): ...@@ -167,13 +168,14 @@ def auto_reply(pk_list):
cursor.execute( cursor.execute(
"SELECT id,user_id FROM topic WHERE id in " + str( "SELECT id,user_id FROM topic WHERE id in " + str(
tuple( tuple(
pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time > '%s'" % now) pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0) and create_time > '%s' " % now)
data = cursor.fetchall() data = cursor.fetchall()
topic_id_list = list(data) topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list) logging.info("Database version : %s " % topic_id_list)
pc.close() pc.close()
exec_count = 0 exec_count = 0
if topic_id_list: if topic_id_list:
try:
def fun_comment(): def fun_comment():
cookies = login() cookies = login()
...@@ -202,6 +204,8 @@ def auto_reply(pk_list): ...@@ -202,6 +204,8 @@ def auto_reply(pk_list):
timer = threading.Timer(10, fun_comment) # 首次启动 timer = threading.Timer(10, fun_comment) # 首次启动
timer.start() timer.start()
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
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