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
111a9dd1
Commit
111a9dd1
authored
Apr 23, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
cc5d5666
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
14 deletions
+21
-14
__init__.py
majia/__init__.py
+2
-2
apps.py
majia/apps.py
+8
-3
auto_instant_click.py
majia/auto_instant_click.py
+10
-5
celery_task_router.py
physical/celery_task_router.py
+1
-4
No files found.
majia/__init__.py
View file @
111a9dd1
from
.get_session
import
*
\ No newline at end of file
majia/apps.py
View file @
111a9dd1
# coding=utf-8
from
__future__
import
unicode_literals
,
print_function
,
absolute_import
from
django.apps
import
AppConfig
from
django.apps
import
AppConfig
class
majiaConfig
(
AppConfig
):
class
MaJiaApp
(
AppConfig
):
name
=
"majia"
verbose_name
=
"马甲用户"
name
=
'majia'
label
=
''
majia/auto_instant_click.py
View file @
111a9dd1
...
@@ -7,13 +7,11 @@ import traceback
...
@@ -7,13 +7,11 @@ import traceback
import
logging
import
logging
from
celery
import
shared_task
from
celery
import
shared_task
from
django.conf
import
settings
from
django.conf
import
settings
from
majia
import
get_comments
,
click
,
login
,
reply
from
majia
.get_session
import
get_comments
,
click
,
login
,
reply
from
majia
import
host
,
user
,
passwd
,
db
from
majia
.get_session
import
host
,
user
,
passwd
,
db
exec_count
=
0
exec_count
=
0
@shared_task
def
auto_click
(
pk_list
):
def
auto_click
(
pk_list
):
exec_count
=
0
exec_count
=
0
try
:
try
:
...
@@ -60,7 +58,6 @@ def auto_click(pk_list):
...
@@ -60,7 +58,6 @@ def auto_click(pk_list):
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
@shared_task
def
auto_reply
(
pk_list
):
def
auto_reply
(
pk_list
):
exec_count
=
0
exec_count
=
0
try
:
try
:
...
@@ -106,3 +103,10 @@ def auto_reply(pk_list):
...
@@ -106,3 +103,10 @@ def auto_reply(pk_list):
except
:
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
@shared_task
def
auto_majia_effect
(
pk_list
):
auto_click
(
pk_list
)
auto_reply
(
pk_list
)
\ No newline at end of file
physical/celery_task_router.py
View file @
111a9dd1
...
@@ -11,11 +11,8 @@ class CeleryTaskRouter(object):
...
@@ -11,11 +11,8 @@ class CeleryTaskRouter(object):
'injection.data_sync.tasks.write_to_es'
,
'injection.data_sync.tasks.write_to_es'
,
],
],
"majia-alpha"
:
[
"majia-alpha"
:
[
'majia.a
pps.majiaConfig.auto_instant_click.auto_click
'
,
'majia.a
uto_instant_click.auto_majia_effect
'
,
],
],
# "majia-alpha": [
# 'majia.auto_instant_click.auto_reply',
# ],
}
}
# Map[TaskName, QueueName]
# Map[TaskName, QueueName]
...
...
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