Commit abc582e9 authored by lixiaofang's avatar lixiaofang

add

parent 8ff25ee9
...@@ -20,12 +20,9 @@ def get_data(): ...@@ -20,12 +20,9 @@ def get_data():
topic_id = list(data) topic_id = list(data)
data_all = [] data_all = []
for i in topic_id: for i in topic_id:
if topic_id[0] <= 4: if i[0] <= 4:
cursor.execute("select creator_id,id from community_pictorial where is_online =True and is_deleted=False and id in (select count(*),pictorial_id from reply group by pictorial_id)") data_all.append(i)
data = cursor.fetchall() logging.info("Database version : %s " % topic_id)
topic_id = list(data)
data_all.append(topic_id)
logging.info("Database version : %s " % topic_id)
return data_all return data_all
except: except:
...@@ -38,7 +35,7 @@ def no_reply_principal(): ...@@ -38,7 +35,7 @@ def no_reply_principal():
logging.info("comment offline pictorial") logging.info("comment offline pictorial")
user_id = get_data() user_id = get_data()
for i in user_id: for i in user_id:
follow_num = random.randint(5, 20) follow_num = random.randint(1, 5)
for num in range(follow_num): for num in range(follow_num):
majia_user_id = get_majia_reply(i[0]) majia_user_id = get_majia_reply(i[0])
cook = logins(majia_user_id) cook = logins(majia_user_id)
......
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