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
54cee0f7
Commit
54cee0f7
authored
Apr 20, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
2703571b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
auto_instant_click.py
majia/auto_instant_click.py
+1
-4
celery_task_router.py
physical/celery_task_router.py
+3
-0
No files found.
majia/auto_instant_click.py
View file @
54cee0f7
...
...
@@ -15,7 +15,6 @@ from get_session import get_comments, get_cookies, click, time_conv, login, repl
@shared_task
def
auto_click
(
es_type
,
id
):
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
...
...
@@ -68,7 +67,7 @@ def auto_click(es_type, id):
@shared_task
def
auto_reply
(
id
):
def
auto_reply
(
es_type
,
id
):
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
...
...
@@ -115,5 +114,3 @@ def auto_reply(id):
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
# 发帖瞬时:[1 - 5]个马甲点赞
# 1. 用户发帖后,[瞬时],1-3条评论
physical/celery_task_router.py
View file @
54cee0f7
...
...
@@ -14,6 +14,9 @@ class CeleryTaskRouter(object):
],
"majia-alpha"
:
[
'injection.data_sync.auto_instant_click.auto_click'
,
],
"majia-alpha"
:
[
'injection.data_sync.auto_instant_click.auto_reply'
,
]
}
...
...
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