Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
30397a8f
Commit
30397a8f
authored
Apr 22, 2019
by
Kai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of git.wanmeizhensuo.com:alpha/physical into test
parents
7ccd42c4
8d3aaf25
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
Project.xml
.idea/codeStyles/Project.xml
+25
-0
auto_instant_click.py
majia/auto_instant_click.py
+3
-6
No files found.
.idea/codeStyles/Project.xml
View file @
30397a8f
...
@@ -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
majia/auto_instant_click.py
View file @
30397a8f
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment