Commit 33ed7ede authored by lixiaofang's avatar lixiaofang

add

parent e756ffe5
......@@ -49,18 +49,19 @@ def get_data(num1, num2):
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
for i in topic_id[1]:
cursor.execute(
"SELECT user_id from user_extra where is_shadow = 1 and user_id = " + str(i) + "")
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
if user_id:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id)
pc.close()
return topic_id_list
if topic_id:
topic_id_list = []
for i in topic_id[1]:
cursor.execute(
"SELECT user_id from user_extra where is_shadow = 1 and user_id = " + str(i) + "")
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
if user_id:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
......@@ -70,7 +71,7 @@ if __name__ == "__main__":
try:
time_list = [[0, 100], [100, 200]]
time_list = [[0, 10000], [10000, 20000]]
# [10000, 20000],
# [20000, 30000],
# ["2017-03-30 15:57:49.000000", "2016-03-30 15:57:49.000000"],
......
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