Commit 30397a8f authored by Kai's avatar Kai

Merge branch 'test' of git.wanmeizhensuo.com:alpha/physical into test

parents 7ccd42c4 8d3aaf25
...@@ -24,5 +24,29 @@ ...@@ -24,5 +24,29 @@
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" /> <option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings> </formatting-settings>
</DBN-SQL> </DBN-SQL>
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
</code_scheme> </code_scheme>
</component> </component>
\ No newline at end of file
...@@ -10,13 +10,11 @@ from celery import shared_task ...@@ -10,13 +10,11 @@ from celery import shared_task
from django.conf import settings from django.conf import settings
from majia import get_comments, get_cookies, click, time_conv, login, reply from majia import get_comments, get_cookies, click, time_conv, login, reply
from majia import host,user,passwd,db from majia import host,user,passwd,db
exec_count =0
@shared_task @shared_task
def auto_click(pk_list): def auto_click(pk_list):
exec_count =0
exec_count = 0
try: try:
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()
...@@ -70,8 +68,7 @@ def auto_reply(pk_list): ...@@ -70,8 +68,7 @@ def auto_reply(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)
......
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