Commit 32e5a81a authored by lixiaofang's avatar lixiaofang

add

parent 16027a9f
......@@ -24,5 +24,29 @@
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</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>
</component>
\ No newline at end of file
......@@ -13,13 +13,13 @@ from get_session import get_comments, get_cookies, click, time_conv, login, repl
@shared_task
def auto_click(es_type, id):
def auto_click(id):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT id,user_id FROM topic WHERE id = " + str(
id) + " and user_id in (select user_id from user_extra where is_shadow = 0)")
id) + " and user_id in (select user_id from user_extra where is_shadow = 0)")
data = cursor.fetchall()
topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list)
......@@ -67,7 +67,7 @@ def auto_click(es_type, id):
@shared_task
def auto_reply(es_type,id):
def auto_reply(id):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
......
......@@ -9,12 +9,12 @@ class CeleryTaskRouter(object):
"tapir-alpha": [
'injection.data_sync.tasks.write_to_es',
],
# "majia-alpha": [
# 'injection.data_sync.auto_instant_click.auto_click',
# ],
# "majia-alpha": [
# 'injection.data_sync.auto_instant_click.auto_reply',
# ]
"majia-alpha": [
'injection.data_sync.auto_instant_click.auto_click',
],
"majia-alpha": [
'injection.data_sync.auto_instant_click.auto_reply',
]
}
......
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