Commit 33ed7ede authored by lixiaofang's avatar lixiaofang

add

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