Commit 81b631c6 authored by 吴升宇's avatar 吴升宇

fix auto click

parent 12d07f1f
......@@ -17,10 +17,10 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=6):
cursor.execute(
"select t.id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' and is_online=1 "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res = cursor.fetchall()
res = cursor.fetchone()
for i, in res:
cursor.execute(
......@@ -108,7 +108,7 @@ def auto_click_per_1d_by_post():
print('auto_click_per_1d_by_post: len %s' % len(auto_click_list))
total = len(auto_click_list)
limit = (total + 10) // 10
limit = (total + 30) // 30
for start in range(0, total, limit):
batch = auto_click_list[start:start + limit]
t = Thread(target=batch_handle, args=[batch])
......
......@@ -18,10 +18,10 @@ def get_commnet_id(numtime, numtime2, content_level_low=0, content_level_top=6):
cursor.execute(
"select t.id from topic t left join user_extra u on t.user_id = u.user_id "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' "
"where u.is_shadow=0 and t.create_time > '%s' and t.create_time < '%s' and is_online=1 "
"and t.content_level >= %s and t.content_level <= %s " % (numtime, numtime2, str(content_level_low), str(content_level_top)))
res = cursor.fetchall()
res = cursor.fetchone()
for i, in res:
cursor.execute(
......
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