Commit ae949003 authored by lixiaofang's avatar lixiaofang

dd

parent 079507f2
...@@ -17,8 +17,7 @@ def auto_click(pk_list): ...@@ -17,8 +17,7 @@ def auto_click(pk_list):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306) pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( cursor.execute(
"SELECT id,user_id FROM topic WHERE id in " + ( "SELECT id,user_id FROM topic WHERE id in " + str(tuple(pk_list)) + " and user_id in (select user_id from user_extra where is_shadow = 0)")
pk_list) + " and user_id in (select user_id from user_extra where is_shadow = 0)")
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)
......
...@@ -4,6 +4,7 @@ import datetime ...@@ -4,6 +4,7 @@ import datetime
import random import random
import traceback import traceback
from django.conf import settings from django.conf import settings
import logging
DATABASES = settings.DATABASES DATABASES = settings.DATABASES
......
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